
-------- Original-Nachricht --------
Datum: Mon, 21 Dec 2009 11:26:04 +0100 Von: Daniel Fischer
An: beginners@haskell.org CC: kane96@gmx.de Betreff: Re: [Haskell-beginners] print all days of calendar
Am Montag 21 Dezember 2009 11:05:03 schrieb kane96@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).
ahhh, it works in the right order. I tried [Jan..Dec] (without the spaces) which failed. Which function can I use to trim the calendar of a month from the calendar of the whole year, because I have to implement a function: getMonth :: Month -> Calendar -> Calendar -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01