
The following works fine: hspr.cabal: -------------------------------------------- Name: hspr Version: 0.2 License: PublicDomain Author: Niklas Broberg Maintainer: nibro@cs.chalmers.se Build-Depends: base, haskell98, haskelldb, hsp Executable: hspr Main-Is: HSPR.hs -------------------------------------------- This does not: hspr.cabal -------------------------------------------- Name: hspr Version: 0.2 License: PublicDomain Author: Niklas Broberg Maintainer: nibro@cs.chalmers.se Build-Depends: base, haskell98, haskelldb, hsp GHC-Options: -F -pgmFtrhsx Executable: hspr Main-Is: HSPR.hs --------------------------------------------
runhaskell Setup.hs configure Error: Non-empty library, but empty exposed modules list. Cabal may not build this library correctly
The difference is the added GHC-Options, same thing happens if I try to add an Extensions rule. Is this an intended behavior? /Niklas

Some more wierd behavior: I have a configure script that uses some custom --with-X flags. I now want to access this script through Cabal. If I say
./configure --with-sessiondb-driver=PostgreSQL
the @DB_UPPER@ markers in my files get exchanged for "PostgreSQL". If I instead write
runhaskell Setup.hs configure --with-sesisondb-driver=PostgreSQL
the @DB_UPPER@ markers become "yes". How come? /Niklas

Niklas Broberg
Name: hspr Version: 0.2 License: PublicDomain Author: Niklas Broberg Maintainer: nibro@cs.chalmers.se Build-Depends: base, haskell98, haskelldb, hsp GHC-Options: -F -pgmFtrhsx
Executable: hspr Main-Is: HSPR.hs
Put the ghc-options in the executable stanza, since that's what you're trying to build.
runhaskell Setup.hs configure Error: Non-empty library, but empty exposed modules list. Cabal may not build this library correctly
The difference is the added GHC-Options, same thing happens if I try to add an Extensions rule. Is this an intended behavior?
Yep, that's the intended behavior. The sanity checker has noticed that you put the ghc-options field in the first stanza, for the library, but since there aren't any exposed modules, there is no library to build, so it complains. The solution is to move the GHC-Options field to the executable stanza. peace, isaac
participants (2)
-
Isaac Jones
-
Niklas Broberg