public
Created

Patch to get HDBC-mysql running on GHC 7.0

  • Download Gist
HDBC-mysql_GHC7.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff -rN old-HDBC-mysql/Database/HDBC/MySQL/Connection.hsc new-HDBC-mysql/Database/HDBC/MySQL/Connection.hsc
2c2
< {-# OPTIONS -fglasgow-exts #-}
---
> {-# LANGUAGE ForeignFunctionInterface, ScopedTypeVariables, EmptyDataDecls #-}
125c125
< mysql_autocommit mysql_ 0
---
> _ <- mysql_autocommit mysql_ 0
674c674
< Types.execute stmt []
---
> _ <- Types.execute stmt []
689c689
< Types.execute stmt []
---
> _ <- Types.execute stmt []
834d833
<
diff -rN old-HDBC-mysql/HDBC-mysql.cabal new-HDBC-mysql/HDBC-mysql.cabal
13c13
< Build-Depends: base >= 2 && < 4, bytestring, time, utf8-string, HDBC >= 2.1.0
---
> Build-Depends: base >= 2 && < 5, bytestring, time, utf8-string, HDBC >= 2.1.0
diff -rN old-HDBC-mysql/Setup.lhs new-HDBC-mysql/Setup.lhs
31,32c31,32
< mysql_config <- findProgramOnPath "mysql_config" verbosity
< mysql_config5 <- findProgramOnPath "mysql_config5" verbosity
---
> mysql_config <- findProgramLocation verbosity "mysql_config"
> mysql_config5 <- findProgramLocation verbosity "mysql_config5"
diff -rN old-HDBC-mysql/testsrc/TestSbasics.hs new-HDBC-mysql/testsrc/TestSbasics.hs
124,125c124
< try $ withTransaction dbh (\_ -> do sExecuteMany sth rows
< fail "Foo")
---
> try $ withTransaction dbh (const $ sExecuteMany sth rows >> fail "Foo") :: IO (Either SomeException a)
diff -rN old-HDBC-mysql/testsrc/Testbasics.hs new-HDBC-mysql/testsrc/Testbasics.hs
141,142c141
< try $ withTransaction dbh (\_ -> do executeMany sth rows
< fail "Foo")
---
> try $ withTransaction dbh (const $ executeMany sth rows >> fail "Foo") :: IO (Either SomeException a)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.