[Haskell-beginners] print all days of calendar

Daniel Fischer daniel.is.fischer at web.de
Mon Dec 21 05:26:04 EST 2009

Am Montag 21 Dezember 2009 11:05:03 schrieb kane96 at gmx.de:
> still have the problem that it says:
> "Not in scope: data constructor `Month'" but Month is declared as:
> data Month = Jan | Feb | Mar | Apr | May | Jun | Jul | Ago | Sep | Oct |
> Nov | Dec deriving (Eq,Enum,Show)

Sorry, didn't look closely enough.
Month is the name of the datatype. You want month to run through all elements of Month, so 
you need a list, namely [Jan .. Dec] (it might be necessary to include Ord in the derived 
instances for Month).

More information about the Beginners mailing list