
It is GADTs (Generalized Algebric Data Types) Notation.
data StateCmd a where Put :: a -> StateCmd a Undo :: StateCmd a Redo :: StateCmd a
is same as
data StateCmd a = Put a | Undo | Redo
-nwn
On 15 April 2010 07:49, Patrick LeBoutillier
Hi,
Sorry I can't be of much help here, but I have a question though:
data StateCmd a where Put :: a -> StateCmd a Undo :: StateCmd a Redo :: StateCmd a deriving (Show, Functor)
I'm not familiar with the above syntax (data ... where). What does it do exactly?
Patrick
-- ===================== Patrick LeBoutillier Rosemère, Québec, Canada _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners