Constructors in GHC (fwd)

Hal Daume III hdaume@ISI.EDU
Wed, 11 Dec 2002 08:36:05 -0800 (PST)

...this seemed not to make it to the mailing list (
isn't valid)...

Hal Daume III

 "Computer science is no more about computers    |
  than astronomy is about telescopes." -Dijkstra |

---------- Forwarded message ----------
Date: Wed, 11 Dec 2002 08:33:50 -0800 (PST)
From: Hal Daume III <>
To: Simon Peyton-Jones <>
Cc:, Kirsten Chevalier <>
Subject: Re: Constructors in GHC


It finally makes sense now :)

> We could make this more consistent in two ways.  Alternative (A): One
> way would be to make it clearer that $wMkT was the real constructor:
> 	data T = $wMkT Int Int
> 	MkT p = case p of (x,y) -> $wMkT x y
> 	f x y = $wMkT x y
> 	g t = case t of $wMkT x y -> x
> Alternative (B): The other alternative would be to make the original
> Haskell constructors into the $w things:
> 	data T = MkT Int Int
> 	$wMkT p = case p of (x,y) -> MkT x y
> 	f x y = MkT x y
> 	g t = case t of MkT x y -> x

As someone using external core, I can resoundly say: I don't really care
:).  I would probably prefer (B), as you seem to, but it's not a strong