Re:Class Hierarchies? Don't Do That
by brentshields on Sunday March 30, 2014 @05:01PM
(#7497893)
You can use GADTs for this. For example:
This allows you to create a polymorphic container like [Showable 5, Showable "hello"] where the polymorphic type is constrained to be a member of the Show typeclass.
[ Parent
| on HN ]