HSQL
HSQL is a database interface [1] with backends to Postgres, MySQL, SQLite and ODBC. It is the only Haskell database interface with native MySQL driver.
HSQL was not updated since April 9, 2007 and the Hackage release does not build with GHC 8.3; it should be patched.
HSQL is looking for a maintainer (if you are the maintainer, please correct this).
Patching for GHC 8.3 / Cabal 1.5.5
Patching HSQL to work with recent GHC and Cabal versions is a standard process described in Upgrading packages.
If you have patched HSQL please provide links here.
hsql-1.7/hsql.cabal patch
@@ -7,5 +7,7 @@
exposed-modules:
Database.HSQL,
Database.HSQL.Types
-build-depends: base
-extensions: ForeignFunctionInterface, TypeSynonymInstances, CPP
+build-depends: base, old-time
+build-type: Simple
+ghc-options: -O2
+extensions: ForeignFunctionInterface, TypeSynonymInstances, CPP, RankNTypes, DeriveDataTypeable
hsql-mysql-1.7/hsql-mysql.cabal patch
Note: you will need MySQL development files and the client library to build this driver. Change /usr/include/mysql to your location of MySQL includes (mysql.h) and /usr/lib/mysql to the location of the mysqlclient shared library (libmysqlclient.so).
@@ -4,8 +4,13 @@
author: Krasimir Angelov <kr.angelov@gmail.com>
category: Database
description: MySQL driver for HSQL.
-exposed-modules: Database.HSQL.MySQL
-build-depends: base, hsql
+ghc-options: -O2
+build-depends: base, hsql, Cabal, old-time
extensions: ForeignFunctionInterface, CPP
-cc-options: -IDatabase/HSQL
+include-dirs: Database/HSQL, /usr/include/mysql
+build-type: Simple
extra-source-files: Database/HSQL/HsMySQL.h
+extra-libraries: mysqlclient
+extra-lib-dirs: /usr/lib/mysql
+exposed-modules:
+ Database.HSQL.MySQL
hsql-mysql-1.7/Setup.lhs replacement
#!/usr/bin/runghc
\begin{code}
import Distribution.Simple
main = defaultMain
\end{code}