Show for a constructor
Why does it complain about this code:
data Point = Point {
x, y :: Int
} deriving (Show)
main = print $ Point (15 20)
by saying:
No instance for (Show (Int -> Point))
arising from a use of `print'
Possible fix: add an instance declaration for (Show (Int -> Point))
No comments:
Post a Comment