[Hugs-users] Explain typeclass instance resolution

Anthony Clayden anthony_clayden at clear.net.nz
Thu Dec 6 10:38:16 UTC 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/hugs-users/attachments/20181206/f6871e1f/attachment.html>


More information about the Hugs-Users mailing list