Existential types: want better syntactic support (autoboxing?)

Philippa Cowderoy flippa at flippac.org
Mon Jan 30 21:26:02 EST 2006

On Mon, 30 Jan 2006, John Meacham wrote:

> an alternative might be to just allow existential types in structures so
> we can have [exists a . Foo a => a], but that probably has its own can
> of worms...

Yup. The boxy types paper gives us impredicativity and allows us to define 
the type, but in GHC you can't allow [exists a . num a => a] to subsume 
[Int] because that'd require mapping across the list to add in the 
dictionaries. You can hack it for lists, but you can't do it for general 

I believe JHC could handle it fine though.

flippa at flippac.org

A problem that's all in your head is still a problem.
Brain damage is but one form of mind damage.

More information about the Haskell-prime mailing list