
When compiling the following program I get the following error messages. I can compile programs that just import and use Binary, but nothing that derives Binary. This is on nhc98 v1.08 (2001-09-25) [ config: ix86-Linux/ghc by malcolm@pc173.cs.york.ac.uk on 25 Sep 2001 ] using a binary tar file to install nhc. Am I using it correctly? Amanda [ajc99@pcburum hier]$ hmake TestBin nhc98 -c -o TestBin.o TestBin.hs ==================================== Error when renaming:: Identifier Binary.<< used at 5:58 is not defined. Identifier Binary.getBitsF used at 5:58 is not defined. Identifier Binary.getF used at 5:58 is not defined. Identifier Binary.sizeOf used at 5:58 is not defined. Identifier Binary.getBits used at 5:58 is not defined. Identifier Binary.putBits used at 5:58 is not defined. Identifier Binary.get used at 5:58 is not defined. Identifier Binary.put used at 5:58 is not defined. Type class Binary.Binary used at 5:58 is not defined. module Main where import Binary data MyTree = Node String MyTree MyTree | Empty deriving Binary main = do bh <- openBin (File "binfile" WO) put bh (Node "hello" Empty Empty) closeBin bh

Amanda,
Error when renaming:: Identifier Binary.<< used at 5:58 is not defined. Identifier Binary.getBitsF used at 5:58 is not defined.
This behaviour is due to a bug in the import mechanism, fixed in nhc98-1.10. If you don't want to upgrade just yet, then you can work around it in 1.08 by having both import Binary import qualified Binary in your file. Regards, Malcolm
participants (2)
-
Amanda Clare
-
Malcolm Wallace