Reiner Pope wrote:
The syntax is for the implicit parameter extension[1]. I think you would write your example as

foo (undefined :: Bar x) ?z :: Bar y

Then querying the type of that whole expression with :t will list ?z's type in the expression's constraints. (Of course, you should turn off the monomorphism restriction so that ghc doesn't complain if constraints aren't resolved).

[1]: http://www.haskell.org/ghc/docs/latest/html/users_guide/other-type-extensions.html#implicit-parameters

Woah... that's some pretty crazy stuff, right there. Just wow.

It would take me months to comprehend how that works. Heh. Oh well, it's useful for debugging the type system though. ;-)

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to