module Plutarch.Numeric.Additive (
AdditiveSemigroup (..),
AdditiveMonoid (..),
) where
import Plutarch (Term)
import Plutarch.Integer (PInteger)
import Prelude qualified
class AdditiveSemigroup a where
(+) :: a -> a -> a
class (AdditiveSemigroup a) => AdditiveMonoid a where
zero :: a
instance AdditiveSemigroup (Term s PInteger) where
+ :: Term s PInteger -> Term s PInteger -> Term s PInteger
(+) = forall a. Num a => a -> a -> a
(Prelude.+)
instance AdditiveMonoid (Term s PInteger) where
zero :: Term s PInteger
zero = Term s PInteger
0