[Haskell-cafe] Printing list of enum type
nowgate at yahoo.com
Tue Apr 14 17:07:06 EDT 2009
I didn't know that, but there's a lot I don't know about Haskell.
It works great.
--- On Tue, 4/14/09, John Dorsey <haskell at colquitt.org> wrote:
From: John Dorsey <haskell at colquitt.org>
Subject: Re: [Haskell-cafe] Printing list of enum type
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Tuesday, April 14, 2009, 3:33 PM
> What do I need to add to this Color enum type to print a list of them?
You can also easily print a list of /all/ of them.
scratch$ cat color.hs
scratch$ ghci color.hs
*Main> [minBound..maxBound] :: [Color]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe