mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 23:38:29 +01:00
33 lines
969 B
Diff
33 lines
969 B
Diff
diff -ru orig/Setup.lhs new/Setup.lhs
|
|
--- orig/Setup.lhs 2013-10-10 10:21:21.877692795 +0300
|
|
+++ new/Setup.lhs 2013-10-10 10:21:21.000000000 +0300
|
|
@@ -2,6 +2,7 @@
|
|
|
|
\begin{code}
|
|
{- OPTIONS_GHC -Wall #-}
|
|
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
|
|
|
|
import Control.Monad (liftM2, mplus)
|
|
import Data.List (isPrefixOf)
|
|
@@ -22,8 +23,19 @@
|
|
}
|
|
}
|
|
|
|
+-- 'ConstOrId' is a Cabal compatibility hack.
|
|
+-- see: https://github.com/scrive/hdbc-postgresql/commit/e9b2fbab07b8f55ae6a9e120ab0b98c433842a8b
|
|
+class ConstOrId a b where
|
|
+ constOrId :: a -> b
|
|
+
|
|
+instance ConstOrId a a where
|
|
+ constOrId = id
|
|
+
|
|
+instance ConstOrId a (b -> a) where
|
|
+ constOrId = const
|
|
+
|
|
mysqlConfigProgram = (simpleProgram "mysql_config") {
|
|
- programFindLocation = \verbosity -> liftM2 mplus
|
|
+ programFindLocation = \verbosity -> constOrId $ liftM2 mplus
|
|
(findProgramLocation verbosity "mysql_config")
|
|
(findProgramLocation verbosity "mysql_config5")
|
|
}
|