1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2024-12-27 05:34:40 +03:00
Idris2/samples/NamedSemi.idr

12 lines
241 B
Idris
Raw Normal View History

[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