[Haskell-cafe] (Feeling that) GHCi is trying to protect me from myself with overlapping instances and existential types
Juan Casanova
juan.casanova at ed.ac.uk
Sun Feb 16 15:46:25 UTC 2020
Upon looking more closely, this caught my eyes on the link I provided:
"Errors are reported lazily (when attempting to solve a constraint),
rather than eagerly (when the instances themselves are defined)."
This may be an argument in favour of your notion, that any kind of
overlap is wrong by definition and it just so happens that it only
flags up when used. I'd still love some comment from someone with a
bit more authority about this.
This would mean I would have to go back to wrapping everything in new
types so that I can explicitly control what is used where and why. I
am becoming less and less of a fan of this technique.
Juan.
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the Haskell-Cafe
mailing list