[Haskell-cafe] Hoogle? [Stacking monads]

Andrew Coppin andrewcoppin at btinternet.com
Thu Oct 9 14:51:31 EDT 2008

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. ;-)

More information about the Haskell-Cafe mailing list