[Haskell-beginners] Type constructors sharing a common field

Lorenzo Tabacchini lortabac at gmx.com
Tue Apr 29 00:32:38 UTC 2014


If you could have a single polymorphic "age" function for all types 
having an age, you could never have this runtime error, because the 
compiler would infer which "age" we are referring to.
The GHC OverloadedRecordFields extension that Michael linked seems to do 
what I am looking for (http://www.well-typed.com/blog/84/).



More information about the Beginners mailing list