Open jespercockx opened 2 years ago
As part of PR #331, I implemented the Laws and instances for the Num
typeclass. Sorry for spamming the issue feed on accident here with all my rebases. I will take better care with my commit messages / rebases in the future.
It would be good to have standard definitions of the type class laws for the classes in the Prelude, and prove them for the instances we provide. Here is an example of how this would look:
Classes for which we should define laws:
Eq
andOrd
Num
BoundedBelow
,BoundedAbove
, andBounded
Enum
Semigroup
andMonoid
Functor
,Applicative
, andMonad
Foldable
andTraversable