You don&#39;t need to add anything, you just need to use list notation correctly. Try typing [Red, Black, White] in at the prompt instead. The commas are part of the list syntax.<br><br><div class="gmail_quote">On Tue, Apr 14, 2009 at 9:15 AM, michael rice <span dir="ltr">&lt;<a href="mailto:nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">What do I need to add to this Color enum type to print a list of them?<br>
<br>Michael<br><br>===============<br><br>
data Color<br>
    = Red<br>
    | Blue<br>
    | Green<br>
    | Yellow<br>
    | Orange<br>
    | Brown<br>
    | White<br>
    | Black<br>
<br>
instance Show Color where<br>
    show Red   = &quot;Red&quot;<br>
    show Blue  = &quot;Blue&quot;<br>
    show Green = &quot;Green&quot;<br>
    show Yellow = &quot;Yellow&quot;<br>
    show Orange = &quot;Orange&quot;<br>
    show Brown = &quot;Brown&quot;<br>
    show White = &quot;White&quot;<br>
    show Black = &quot;Black&quot;<br><br>======================<br><br>
Ok, modules loaded: Main.<br>*Main&gt; Red<br>Red<br>*Main&gt; Black<br>Black<br>*Main&gt; [Red Black White]<br><br>&lt;interactive&gt;:1:1:<br>    Couldn&#39;t match expected type `Color -&gt; Color -&gt; t&#39;<br>           against inferred type `Color&#39;<br>
    In the expression: Red Black White<br>    In the expression: [Red Black White]<br>    In the definition of `it&#39;: it = [Red Black White]<br><br><br><br><br><br></td></tr></tbody></table><br>



      <br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>