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 
structures.

I believe JHC could handle it fine though.

-- 
[EMAIL PROTECTED]

A problem that's all in your head is still a problem.
Brain damage is but one form of mind damage.
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to