Open nicolabotta opened 9 years ago
I think this should work, so I think this is a confirmed bug.
With regards to the proofs of associativity and neutrality, I believe that there was some discussion that it might be hard in practice to prove this for many monoids with propositional equality, and so someone recommended to have Verified*
versions instead. I can't remember exactly what happened for the rest.
With regards to the proofs of associativity and neutrality, I believe that there was some discussion that it might be hard in practice to prove this for many monoids with propositional equality, and so someone recommended to have Verified* versions instead. I can't remember exactly what happened for the rest.
I understand the difficulties, but I think that instead of calling Monoid
something that does not need to be a monoid (and VerifiedMonoid
something that is just a monoid) it would be better to call monoids Monoid
and things that do not need to be monoids something else. Idris is one of the few languages that allow programmers to encode precise notions as data types. Let's use it to call things as they are!
@nicolabotta I was unfortunately not a decision maker in that library design idea, and so I am only reenumerating what I was told :).
The code
does not type check:
Am I doing something wrong? How can I hide the prelude declaration of
(<+>)
?On a side track: why do the prelude type classes
Semigroup
andMonoid
not require associativity of(<+>)
and neutrality ofneutral
?