2

AFAIK, instance resolution in Haskell only looks at the instance head and doesn't backtrack to look for more potential instances (find best match?) (as explained here). Is there any reason for that?

In other words, why are constraints not considered during instance resolution? Is it to avoid recompiling packages, in case new instance declarations become available (as it can effect instance resolution)?

glennsl
  • 28,186
  • 12
  • 57
  • 75
zeronone
  • 2,912
  • 25
  • 28

0 Answers0