
When I try to build using ./Setup build I get the following error: Compiling Codec.Encryption.DESAux ( ./Codec/Encryption/DESAux.hs, dist/build/./Codec/Encryption/DESAux.o ) ./Codec/Encryption/DESAux.hs:19:0: Illegal instance declaration for `Num [Bool]' (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Num [Bool]' ./Codec/Encryption/DESAux.hs:21:0: Illegal instance declaration for `Bits [Bool]' (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Bits [Bool]' So I added Ghc-options: -fglasgow-exts to the cabal file. Now this module compiles but I still get the same error on a different module and I know -fglasgow-exts allows this to compile when I do it by hand. ./Codec/ASN1/TLV.hs:140:0: Illegal instance declaration for `Binary (State ([Octet], Offset))' (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Binary (State ([Octet], Offset))' In fact, this seems to be the second time this module has been compiled and the first it completed successfully. Compiling Codec.ASN1.TLV ( ./Codec/ASN1/TLV.hs, dist/build/./Codec/ASN1/TLV.o ) Compiling Codec.ASN1.X509 ( ./Codec/ASN1/X509.hs, dist/build/./Codec/ASN1/X509.o ) Why is cabal recompiling sources and why am I getting errors on the second compilation? The sources and the cabal file are available via: darcs get http://www.haskell.org/Codec Dominic.

On Apr 5, 2005 9:59 PM, Dominic Steinitz
When I try to build using
./Setup build
I get the following error:
Compiling Codec.Encryption.DESAux ( ./Codec/Encryption/DESAux.hs, dist/build/./Codec/Encryption/DESAux.o )
./Codec/Encryption/DESAux.hs:19:0: Illegal instance declaration for `Num [Bool]' (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Num [Bool]'
./Codec/Encryption/DESAux.hs:21:0: Illegal instance declaration for `Bits [Bool]' (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Bits [Bool]'
So I added
Ghc-options: -fglasgow-exts
to the cabal file. Now this module compiles but I still get the same error on a different module and I know -fglasgow-exts allows this to compile when I do it by hand.
./Codec/ASN1/TLV.hs:140:0: Illegal instance declaration for `Binary (State ([Octet], Offset))' (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Binary (State ([Octet], Offset))'
In fact, this seems to be the second time this module has been compiled and the first it completed successfully.
Compiling Codec.ASN1.TLV ( ./Codec/ASN1/TLV.hs, dist/build/./Codec/ASN1/TLV.o ) Compiling Codec.ASN1.X509 ( ./Codec/ASN1/X509.hs, dist/build/./Codec/ASN1/X509.o )
Why is cabal recompiling sources and why am I getting errors on the second compilation?
Pass '-v' to the Setup script to see how Cabal calls GHC. -- Friendly, Lemmih

Dominic Steinitz
So I added
Ghc-options: -fglasgow-exts
You might look at the Extensions field to see if your exstension is explicitly listed there.
to the cabal file. Now this module compiles but I still get the same error on a different module and I know -fglasgow-exts allows this to compile when I do it by hand.
It's perhaps because it's trying to build an executable at this point and you didn't add that flag to the executables. I take it that the executables depend on the library? (snip)
Why is cabal recompiling sources and why am I getting errors on the second compilation?
Executables that depend on their own libraries are slightly awkward right now; we hope to improve support for that in the future. For now, you should add that flag to both executables. You should also list the depended-upon modules to the other-modules field for that executable.
The sources and the cabal file are available via:
I couldn't build it because I don't have the NewBinary package. peace, isaac

Isaac, Thanks for your prompt and comprehensive response. Dominic. On Tuesday 05 Apr 2005 9:33 pm, Isaac Jones wrote:
Dominic Steinitz
writes: (snip)
So I added
Ghc-options: -fglasgow-exts
You might look at the Extensions field to see if your exstension is explicitly listed there.
It wasn't clear to me which extension to use. Is there some way of finding out or do you just have to know?
to the cabal file. Now this module compiles but I still get the same error on a different module and I know -fglasgow-exts allows this to compile when I do it by hand.
It's perhaps because it's trying to build an executable at this point and you didn't add that flag to the executables. I take it that the executables depend on the library? That's fixed it.
(snip)
Why is cabal recompiling sources and why am I getting errors on the second compilation?
Executables that depend on their own libraries are slightly awkward right now; we hope to improve support for that in the future. For now, you should add that flag to both executables. You should also list the depended-upon modules to the other-modules field for that executable. Ok.

On Tuesday 05 Apr 2005 9:33 pm, Isaac Jones wrote:
Dominic Steinitz
writes: (snip)
snip
I couldn't build it because I don't have the NewBinary package.
peace,
isaac
I've been using "Hal Daume III's NewBinary now ghc6ized, cabalized, debianize, darcsized" see the reference below. It now no longer builds as it uses the old version of cabal. Should I be using it? Should I update the cabal file and move it somewhere more accessible? If so where? Is this what hackage is for? Dominic. http://www.haskell.org/pipermail/libraries/2004-November/002676.html

Dominic Steinitz
I've been using "Hal Daume III's NewBinary now ghc6ized, cabalized, debianize, darcsized" see the reference below. It now no longer builds as it uses the old version of cabal.
Should I be using it?
Sure.
Should I update the cabal file and move it somewhere more accessible?
Update the cabal file and send it to the upstream author, or ask him to do it and make a new release.
If so where? Is this what hackage is for?
There's no central database of cabal packges YET, but once there is, you will probably still want to send fixes like this to the upstream authors so they can make a release and upload it to Hackage. I don't think we plan to take patch management out of the hands of the authors of the tools! peace, isaac
participants (3)
-
Dominic Steinitz
-
Isaac Jones
-
Lemmih