Re: Exporting 0ary Constructors

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.user
Message-ID <[email protected]>
On Mon, Jul 07, 2003 at 01:56:22PM +0530, Arun Kumar S Jadhav wrote:
> 	With the previous release of hugs (hugs98 - Feb 2000) I could
> export 0ary data constructor functions.
> E.g
> 	data SplitOpt = EDGE_SPLIT | SIMP_GRAPH
> 	        deriving (Eq)
> and I could export EDGE_SPLIT and SIMP_GRAPH.
> 	But with latest release (hugs98 - Nov 2002) I get error message
> which essentially means I cannot export EDGE_SPLIT or SIMP_GRAPH.
> 	How to overcome this?

The old behaviour was a bug -- Haskell 98 doesn't permit exporting
constructors by themselves.  You can export

	SplitOpt(EDGE_SPLIT)

but not EDGE_SPLIT without SplitOpt.
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.