instances package:ghc
Retrieve all type and family instances in the environment, indexed by
Name. Each name's lists will contain every instance in which
that name is mentioned in the instance head.
Returns the instances defined by the specified module. Warning:
currently unimplemented for package modules.
Find all the instance declarations (of classes and families) from the
Home Package Table filtered by the provided predicate function. Used
in tcRnImports, to select the instances that are in the
transitive closure of imports from the currently compiled module.
Find instances visible from the given set of imports
All instances and family instances created during this session. These
are grabbed en masse after each update to be sure that proper
overlapping is retained. That is, rather than re-check the overlapping
each time we update the context, we just take the results from the
instance code that already does that.
Could not solve a constraint using available instances because the
instances overlap.
Test cases: tcfail118, tcfail121, tcfail218.
This datatype collates instances that match or unifier, in order to
report an error message for an unsolved typeclass constraint.