data Months = January|February|March|April|May|June|July
deriving (Eq, Ord, Enum)
instance Show Months where
show January="Jan"
show February="Feb"
show March="Mar"
....
What do I need to do to show the output as such: ”Jan”, ”Feb”, ..., ”July" ?
Showinstance - it is wrongly indented use at least 2 spaces before eachshow ...; if you mean how to print it on command line - useprint JanuaryorputStrLn $ show JanuaryMonth- as the plural would usually indicate a list of things (this is just convention).