Ross Paterson wrote:
Why would a type variable be present at runtime, let alone bound to _|_?

Well, it'd be present in jhc. And you want your intermediate language to typecheck even if the types disappear before you get to assembly language. And the same issue shows up with dictionaries, e.g. in

    data MyObj = forall a. MyInterface a => MyObj a

    f x = myFunc o where MyObj o = x

In order to make this work, you have to support lifted dictionaries, which means a potential performance penalty on every dictionary lookup.

Hugs does accept that code, so I assume it's paying that penalty, unless there's some other solution to this problem that I'm missing.

-- Ben

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to