Proposal: Data.Proxy

Musasabi ekarttun at cs.helsinki.fi
Fri Feb 9 03:48:21 EST 2007


On 08.02 10:53, Ross Paterson wrote:
> On Thu, Feb 08, 2007 at 10:49:46AM +0000, Neil Mitchell wrote:
> > Wouldn't a definition such as:
> > 
> > data Proxy a
> > 
> > Achieve the same effect?
> 
> In Haskell 98,
> 
> 	newtype Proxy a = Proxy (Proxy a)
> or
> 	data Proxy a = Proxy !(Proxy a)
> 
> yield one-point types.

I think these definitions make sense.

One more reason not to export the constructor so the actual
implementation will be hidden.

I don't have a strong opinion to Type.Proxy vs Data.Proxy, but
creating a new hierarchy would probably need more consensus.

- Einar Karttunen


More information about the Libraries mailing list