data vs. newtype, abstractly

Fergus Henderson fjh@cs.mu.OZ.AU
Wed, 19 Mar 2003 17:48:24 +1100


On 09-Mar-2003, Hal Daume III <hdaume@ISI.EDU> wrote:
> well, yes, but if you export:
> 
> mkN :: Int -> N
> mkD :: Int -> D
> 
> or something like that, then they'll still bea ble to tell the difference,
> right?

Not necessarily.  For example mkD could be defined as

	mkD x = x `seq` D x

in which case I think it would behave exactly the same as mkN.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.