Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
sheaf's avatar
sheaf authored
We now only default type variables if they only appear in constraints
of the form `C v`, where `C` is either a standard class or a class with
an in-scope default declaration.

This rectifies an oversight in the original implementation of the
NamedDefault extensions that was remarked in #25775; that implementation
allowed type variables to appear in unary constraints which had arbitrary
classes at the head.

See the rewritten Note [How type-class constraints are defaulted] for
details of the implementation.

Fixes #25775
Fixes #25778
a2c992a1
History
Name Last commit Last update