Re: Trex

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
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).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.