[Haskell-beginners] Heterogeneous Lists
allbery.b at gmail.com
Tue May 28 16:30:03 CEST 2013
On Tue, May 28, 2013 at 10:00 AM, harry <voldermort at hotmail.com> wrote:
> So so rephrase my question, why can't type classes be used as a type? Is
> this an implementation issues, or is there a semantic problem with this?
> Creating an existential type and packing all the values seems like busy
> which shouldn't be necessary, or at least something that the compiler
> be doing for me.
Haskell is strongly typed; if you want to throw out all the type
information, you must tell if explicitly (which is what the existential
does). This comes at a price, of course: once you've thrown out the type
information, you can't get it back.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners