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
_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell