
30 Mar
2011
30 Mar
'11
9:04 a.m.
On Wed, Mar 30, 2011 at 6:52 AM, Tad Doxsee
Greg,
Thanks for your help. Is there any significant difference between using existential quantification
data ShapeD = forall s. ShapeC => ShapeD s
versus a GADT
data ShapeD where ShapeD :: ShapeC s => s -> ShapeD
I'm not sure I understood what you meant by "You don't need to write more typeclass instances this way."
Sorry, I misspoke -- they're equivalent. Personally I find the
existential easier to read.
G
--
Gregory Collins