
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.