@@ -0,0 +1,32 @@
1+diff -ru orig/Setup.lhs new/Setup.lhs
2+--- orig/Setup.lhs 2013-10-10 10:21:21.877692795 +0300
3++++ new/Setup.lhs 2013-10-10 10:21:21.000000000 +0300
4+@@ -2,6 +2,7 @@
5+
6+ \begin{code}
7+ {- OPTIONS_GHC -Wall #-}
8++{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
9+
10+ import Control.Monad (liftM2, mplus)
11+ import Data.List (isPrefixOf)
12+@@ -22,8 +23,19 @@
13+ }
14+ }
15+
16++-- 'ConstOrId' is a Cabal compatibility hack.
17++-- see: https://github.com/scrive/hdbc-postgresql/commit/e9b2fbab07b8f55ae6a9e120ab0b98c433842a8b
18++class ConstOrId a b where
19++ constOrId :: a -> b
20++
21++instance ConstOrId a a where
22++ constOrId = id
23++
24++instance ConstOrId a (b -> a) where
25++ constOrId = const
26++
27+ mysqlConfigProgram = (simpleProgram "mysql_config") {
28+- programFindLocation = \verbosity -> liftM2 mplus
29++ programFindLocation = \verbosity -> constOrId $ liftM2 mplus
30+ (findProgramLocation verbosity "mysql_config")
31+ (findProgramLocation verbosity "mysql_config5")
32+ }