8 Aug
2005
8 Aug
'05
2:31 p.m.
Am Montag, 8. August 2005 11:30 schrieb Bulat Ziganshin:
[...]
constructor gives you type-safety! without constructor there is no difference between Point and (Float, Float), only constructor give you syntax difference between these two types!
newtype Point = Point (Float, Float) unPoint (Point p) = p
Or, more simply: newtype Point = Point {unPoint :: (Float,Float) } Best regards, Wolfgang