[Haskell-cafe] database access recommendation

Brock Peabody brock.peabody at npcinternational.com
Thu Apr 27 11:45:16 EDT 2006


I'm teaching myself Haskell, and was wondering if anyone could recommend
a library for accessing databases, PostgreSQL in particular.

I looked at http://www.haskell.org/haskellwiki/Libraries_and_tools, and
HSQL looked promising, but I can't get it to install on Windows or
FreeBSD, with Hugs or GHC.  According to the FreeBSD ports system, it is
marked as broken.

It fails with Hugs on both platforms on the "runhugs Setup.lhs
configure" step in the base HSQL library with:

FreeBSD:

ERROR
"/usr/local/lib/hugs/libraries/Text/ParserCombinators/ReadP.hs":133 -
Syntax error in type expression (unexpected `.')

Windows:

ERROR "C:\Program
Files\WinHugs\libraries\Text\ParserCombinators\ReadP.hs":156 -
 Syntax error in type expression (unexpected `.')

GHC crashes with no error on the "runghc Setup.lhs build" step in the
base HSQL library in Windows.  In FreeBSD I can completely build and
install the base library, but in any of the database specific
directories, "runghc Setup.lhs configure" yields:

"Setup.lhs:17:71:
    Couldn't match `PackageDescription' against `LocalBuildInfo'
      Expected type: Args -> ConfigFlags -> LocalBuildInfo -> IO
ExitCode
      Inferred type: [String]
                     -> ConfigFlags
                     -> PackageDescription
                     -> LocalBuildInfo
                     -> IO ExitCode
    In the `postConf' field of a record
    In the record update: defaultUserHooks {preConf = preConf, postConf
= postConf}

<interactive>:1:87:
    Failed to load interface for `Main':
        Bad interface file: Setup.hi
            Setup.hi: openBinaryFile: does not exist (No such file or
directory)"

Thanks,
Brock



More information about the Haskell-Cafe mailing list