Explain typeclass instance resolution
6 Dec
2018
6 Dec
'18
4:08 p.m.
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
2592
Age (days ago)
2592
Last active (days ago)
0 comments
1 participants
participants (1)
-
Anthony Clayden