Haskell 98

Simon Marlow simonmar at microsoft.com
Wed Sep 25 11:32:09 EDT 2002


> Out of curiousity, it's a bit strange that
> 
>  > data D = D !Int
>  > myD = D {}
> 
> in invalid, but
> 
>  > newtype N = N !Int
>  > myN = N {}
> 
> is not.

The second example is also invalid: the newtype declaration is
disallowed by the grammar.  (incedentally, it looks like this example
triggers a bug in nhc98).

Cheers,
	Simon



More information about the Glasgow-haskell-bugs mailing list