
However, be aware that aFields, bFields and cFields are now partial
functions that will crash when applied to the wrong constructor. Not
a-okay in my book.
Erik
On Wed, Mar 14, 2012 at 02:24, John Meacham
Why not
data Super = SuperA { commonFields :: () aFields :: () } | SuperB { commonFields :: () bFields :: () } | SuperC { commonFields :: () cFields :: () }
reusing the common field names between constructors like this is a-okay.
John
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe