Re: [Haskell-cafe] data vs newtype (was: newbie problems)

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.
7624
Age (days ago)
7624
Last active (days ago)
0 comments
1 participants
participants (1)
-
MR K P SCHUPKE