{-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module Protolude.Semiring ( Semiring, one, (<.>), zero, ) where import Data.Monoid -- | Alias for 'mempty' zero :: Monoid m => m zero :: forall m. Monoid m => m zero = m forall m. Monoid m => m mempty class Monoid m => Semiring m where {-# MINIMAL one, (<.>) #-} one :: m (<.>) :: m -> m -> m