mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 04:43:25 +03:00
827c51e343
Some way through the interfaces docs, but "using" for named parent interfaces is not implemented yet.
12 lines
241 B
Idris
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
|