kongware / scriptum

Functional Programming Unorthodoxly Adjusted to Client-/Server-side Javascript
MIT License
383 stars 21 forks source link

Invalid type unification with `Option`'s `Monoid` instance #325

Closed ivenmarquardt closed 3 years ago

ivenmarquardt commented 3 years ago

Option.Monoid(Prod.Semigroup) has type Monoid<Option<a>> but it should have Monoid<Option<Number>>. This is an error within unification or substitution.

ivenmarquardt commented 3 years ago

This was an annoying bug, because it already worked for ADTs, which very much resemble type classes.