[haskell-llvm] LLVM and Cabal 1.10.0.0

Maciej Piechotka uzytkownik2 at gmail.com
Sun Dec 12 08:09:22 EST 2010


On Sun, 2010-12-12 at 12:22 +0100, Henning Thielemann wrote:
> On Sun, 12 Dec 2010, Maciej Piechotka wrote:
> 
> > About recent problems with building LLVM with GHC-7 + Cabal 1.10.0.0:
> >
> > After changin the offending lines to:
> >
> >    packageDb = case flagToList (regPackageDB regFlags) of
> >                    [] -> [GlobalPackageDB,
> >                           registrationPackageDB (withPackageDB lbi)]
> >                    xs -> xs
> >
> > everything seems to be OK (in one settings).
> 
> This would work with GHC-6.10.4, too. However using 'flagToMaybe' is 
> closer to what is currently in Setup.hs:
> 
>      packageDb = case flagToMaybe (regPackageDB regFlags) of
>                      Just db -> db
>                      Nothing -> [GlobalPackageDB,
>                                  registrationPackageDB (withPackageDB lbi)]
> 
> 
> I don't know anything about the implications.
> 

Main implication is that it does not type check with Cabal 1.10.0.0 I
imagine:

[1 of 1] Compiling Main             ( Setup.hs, Setup.o )

Setup.hs:113:32:
    Couldn't match expected type `PackageDB' with actual type `[t]'
    In the expression:
      [GlobalPackageDB, registrationPackageDB (withPackageDB lbi)]
    In a case alternative:
        Nothing
          -> [GlobalPackageDB, registrationPackageDB (withPackageDB
lbi)]
    In the expression:
      case flagToMaybe (regPackageDB regFlags) of {
        Just db -> db
        Nothing
          -> [GlobalPackageDB, registrationPackageDB (withPackageDB
lbi)] }

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://projects.haskell.org/pipermail/haskell-llvm/attachments/20101212/7f02f7de/attachment-0001.pgp 


More information about the Haskell-llvm mailing list