purescript / documentation

Documentation for the PureScript language, compiler, and tools.
Other
1.03k stars 300 forks source link

Document how constraints affect instance selection #179

Open chexxor opened 6 years ago

chexxor commented 6 years ago

It sounds like type class constraints might not affect instance selection. We should confirm that claim and add to the "language/Type-Classes.md" document.

Claimed here: https://purescript-users.ml/t/type-class-that-has-a-monoid-instance-seems-to-require-all-instances-to-also-be-monoids/101/8

I'm also curious about this topic.

LiamGoodacre commented 6 years ago

Yeah they don't contribute to comitting to an instance. To have constraints contribute there is this ticket https://github.com/purescript/purescript/issues/3120 but it is non-trivial.