Created
April 15, 2011 23:08
-
-
Save beastaugh/922625 to your computer and use it in GitHub Desktop.
Patch to get HDBC-mysql running on GHC 7.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment