Idris2-boot/samples/NamedSemi.idr
Edwin Brady 827c51e343 More documentation updates
Some way through the interfaces docs, but "using" for named parent
interfaces is not implemented yet.
2020-02-25 21:01:15 +00:00

12 lines
241 B
Idris

[PlusNatSemi] Semigroup Nat where
(<+>) x y = x + y
[MultNatSemi] Semigroup Nat where
(<+>) x y = x * y
[PlusNatMonoid] Monoid Nat using PlusNatSemi where
neutral = 0
[MultNatMonoid] Monoid Nat using MultNatSemi where
neutral = 1