[Haskell-cafe] Existentially-quantified constructors, Eq and Show

Joel Reymont joelr1 at gmail.com
Thu Dec 8 04:17:15 EST 2005


On Dec 8, 2005, at 12:09 AM, John Meacham wrote:

> if you are okay with a being an argument then
>
>> data State a
>>     = Start
>>     | Stop
>>     | State a
>>    deriving(Show,Eq)
>
> will do what you want I believe.

This does the trick! Thank you!

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list