Open matt-noonan opened 5 years ago
In Hoogle 4 I split Coercible a b
into Coercible1 a, Coercible2 b
- it isn't a perfect match, but it's somewhat close. Nullary constraints are special, and rare, so I ignoring them entirely is probably fine (Partial
is really an annotation). The way Monad Maybe
should be dealt with is by checking the list of instances, which I think Hoogle does record. One that has an instance would have a penalty of 0, one that isn't would be pretty hard.
The current type search applies a cost to any non-concrete constraints (e.g. a penalty is applied for
Monad m
, but notMonad Maybe
, which may appear when specializing a type to match the query). We may want to add costs for non-unary constraints as well, such asCoercible a b
orPartial
, but at the moment these are not reflected in the types as stored in the db.