HaskellDB is able to use the HDBC driver to connect to several supported database. The HSQL driver is available but unsupported at the moment. Feel free to Volunteer?!

Postgres using HDBC

To be filled out

Sqlite3 using HDBC

Install HDBC and HDBC-sqlite3

cabal install HDBC HDBC-sqlite3 

Install haskelldb and haskelldb-hdbc-sqlite3

cabal install haskelldb haskelldb-hdbc haskelldb-hdbc-sqlite3

Create connection code for the database "sqlite.db"

import Control.Monad.Trans
import Database.HaskellDB.HDBC.SQLite3
import Database.HaskellDB

withDB :: MonadIO m => (Database -> m a) -> m a
withDB = sqliteConnect "sqlite.db"