[Haskell-cafe] Cabal and DB packages

Thomas Schilling nominolo at googlemail.com
Sun Nov 25 13:23:15 EST 2007


On Sun, 2007-11-25 at 18:49 +0100, manu wrote:
> Hello,
> 
> I'm trying to do something that should be fairly simple, installing  
> some DB package so I can use MySQL or SQLite.
> 
> However I've had troubles building HSQL, HaskellDB and Takusen before  
> giving up (I am using ghc 6.8.1 and Cabal-1.2.2.0).
> 
> ------------------
> 
> with HSQL :
> 
> Database/HSQL.hsc:66:7:
>      Could not find module `System.Time':
>        it is a member of package old-time-1.0.0.0, which is hidden
> 
> so I added 'old-time' to the 'build-depends' line in the .cabal file
> 
> but then it fails building with
> 
> Building hsql-1.7...
> [1 of 2] Compiling Database.HSQL.Types ( Database/HSQL/Types.hs, dist/ 
> build/Database/HSQL/Types.o )
> 
> Database/HSQL/Types.hs:134:18: Not in scope: type variable `forall'
> 
> Database/HSQL/Types.hs:134:25: Not in scope: type variable `a'
> 
> Database/HSQL/Types.hs:134:27:
>      Illegal operator `.' in type `forall a . (Int
>                                                -> FieldDef
>                                                   -> (FieldDef ->  
> CString -> Int -> IO a) -> IO a)'
>        (Use -XTypeOperators to allow operators in types)
> 

This means you need -XRank2Polymorphism
or maybe -XExistentialQuantification.

> etc...
> 
> At this point, it goes over my head...
> 
> ---------------
> 
> What the hell, I'll use HaskellDB and FlatDB, but then I get this  
> message while building HaskellDB :
> 
> src/Database/HaskellDB/HDBRec.hs:106:11:
>      Illegal signature in pattern: l f a
>          Use -XPatternSignatures to permit it
> 
> when I add 'PatternSignatures' to the 'Extensions:' line in .cabal,  
> it fails configuring with :
> 
> Setup.hs: haskelldb.cabal:8: Parse of field 'extensions' failed:
> 
> Jeeeesus, nevermind, I'll try Takusen

Are you sure you specified the right extensions? (correct spelling,
correct separators)  Unfortunately readP doesn't give you nice error
messages.

> 
> ---------------
> 
> with Takusen :
> 
> $ runhaskell Setup.hs configure
> 
> Setup.hs:26:7:
>      Could not find module `Distribution.Program':
>        Use -v to see a list of the files searched for.
> 
> I give up...
> 
> ----------------

That means that Takusen requires an older Cabal.  I'd have to look at
the code to see how hard it would be to fix this.

> Is there any simple way to do it though ? Is there any problems with  
> Cabal that I need to work around ?
> 
> Help !!
> 
> Manu
> 
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list