[Haskell-cafe] Type problem with simple takusen code (was: Trivialdatabase access in Haskell)

Bayley, Alistair Alistair_Bayley at invescoperpetual.co.uk
Wed Dec 13 04:11:48 EST 2006

> From: Paul Moore [mailto:p.f.moore at gmail.com] 
> >runhaskell db.hs
> can't load .so/.DLL for: sqlite3 (addDLL: unknown error)
> This seems odd, as I'm not (intending to be) using sqlite here. If I
> copy a sqlite3.dll onto my PATH (just to get by, it's quite possible
> sqlite isn't set up right but I really don't care just now) I get past
> this, but get
> >runhaskell db.hs
> <interactive>:
> C:\Program Files\Haskell\Takusen-0.6\ghc-6.6/HSTakusen-0.6.o: unknown
> symbol `_PQconnectdb'
> ghc.exe: unable to load package `Takusen-0.6'

This appears to be caused by ghci/runhaskell wanting to link the entire
library at once, rather than just the modules you're using. I don't know
if this is a bug or a feaure with ghci; anybody else want to comment?

This problem affects both ghci and runhaskell. It does not affect ghc,
though. I'm not sure what the best solution is; we might have to do what
Krasimir did with HSQL and make each database-specific module a separate

For now, if you want to use Takusen, you are stuck with ghc (the
compiler). This invocation:
  > ghc --make db.hs -o db
should make you a working db.exe.

I have added a README.txt to the darcs repo, which hopefully provides a
lot of this missing information. I haven't added uninstall instructions
though :-)

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Haskell-Cafe mailing list