Problem when trying to define Show for my Point3D type in Haskell
- by devoured elysium
I am trying to define Show for my Point3D type:
type Point3D = (Integer, Integer, Integer)
instance Show Point3D where
show (x,y,z) = "<" ++ (show x) ++ "," ++ (show y) ++ "," ++ (show z) ++ ">"
yet I must be missing something in the sintax, as I am always getting an error:
Illegal instance declaration for `Show Point3D'
(All instance types must be of the form (T t1 ... tn)
where T is not a synonym.
Use -XTypeSynonymInstances if you want to disable this.)
In the instance declaration for `Show Point3D'
What am I doing wrong?