Using version Nov 2002 in Windows XP I find that import Trex gives me Reading file "c:\progra~1\hugs98\lib\hugs\Trex.hs": ERROR "c:\progra~1\hugs98\lib\hugs\Trex.hs" - Illegal export of a lone data cons tructor "EmptyRec" This can be cured by removing the export of EmptyRec from Trex.hs but I don't think this should be necessary. Stephen Eldridge phone: 0161-200-3352 email: see@co.umist.ac.uk Department of Computation, UMIST, Manchester M60 1QD
On Fri, Jan 10, 2003 at 12:50:14PM +0000, Stephen Eldridge wrote:
Using version Nov 2002 in Windows XP I find that import Trex gives me
Reading file "c:\progra~1\hugs98\lib\hugs\Trex.hs": ERROR "c:\progra~1\hugs98\lib\hugs\Trex.hs" - Illegal export of a lone data cons tructor "EmptyRec"
This can be cured by removing the export of EmptyRec from Trex.hs but I don't think this should be necessary.
Exporting a constructor wasn't legal Haskell, and now Hugs implements this restriction. I think the problem is that EmptyRec isn't a real constructor (it has type Rec EmptyRow, not Rec r), and the fix should be to add emptyRec = EmptyRec and export that instead of EmptyRec (and maybe change the Show instance to match).
participants (2)
-
Ross Paterson -
Stephen Eldridge