
5 Jul
2004
5 Jul
'04
2:08 p.m.
One difference is that Constuctors for 'data' can be curries, whereas 'newtype' cannot: data X a b c = X a b c newtype X a b c = X (a,b,c) But you have to balance this against newtypes being neater. Also data can represend and abstract type: data X whereas newtype cannot, also data can represent unitary types: data Y = Y whereas newtype is limited to wrapping up void: newtype Z = Z () Keean.