Explain typeclass instance resolution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Explain typeclass instance resolution

AntC
He he, while I was poking about in the type inference code ...

There's an experimental command `:xplain` instance resolution.

The code to implement it needs switching on with a preprocessor flag set in options.h.in then ./configure and recompile Hugs.

Use it by giving a constraint to be explained:

Hugs> :x Show (Maybe [Int])

(It seems a bit temperamental, fair enough for a hidden feature: if it can't resolve an instance, it'll say so, but also give some misleading messages with fragments of code leftover from previous uses.)


AntC

_______________________________________________
Hugs-Users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-users