Open Marwes opened 6 years ago
One way of fixing this would be to make implicit imports (?
) be bound on identifiers instead of records. That way there is always an identifier to refer to.
Another way would be to track the position of the import better and say something akin to
Unable to resolve implicit candidates:
eq: Eq String imported from line x, column y
let { ? } = import! std.string
^
...
If an implicit argument could not be resolved the typechecker displays a list of all bindings that were considered. This works well for bindings that can be refereed to directly but when an implicit were imported via
{ ? }
there is no proper binding to refer to.What happens instead is that the error will display
implicit?<number>
which is the name of a generated variable.