au-ts / cogent

Cogent Project
https://trustworthy.systems/projects/TS/cogent.pml
Other
158 stars 26 forks source link

compiler: add version restriction on monoid-subclasses #326

Closed ZhuoZoeyChen closed 4 years ago

vjackson725 commented 4 years ago

Yes, 1.1 changes CommutativeMonoid to be (Monoid t, Commutative t). The Alternative would be to change the code and bump the lower bound.

zilinc commented 4 years ago

Typically I would prefer implementing a conditional, or bumping the lower bound if none of our supported compiler rely on an older version.

zilinc commented 4 years ago

I implemented tne conditional in 88d30921818cb318c1c3094c8e330b6425ce9dea, which can be used instead of upper bound.