coda-0.0.1: The coda compiler

Safe HaskellNone
LanguageHaskell2010

Coda.Algebra.Zero

Synopsis

Documentation

class Semigroup a => SemigroupWithZero a where Source #

zero <> a = zero = a <> zero

Minimal complete definition

zero

Methods

zero :: a Source #

newtype WithZero a Source #

Constructors

WithZero 

Fields

Bundled Patterns

pattern Zero :: WithZero a 
pattern NonZero :: a -> WithZero a 

Instances

Monad WithZero Source # 

Methods

(>>=) :: WithZero a -> (a -> WithZero b) -> WithZero b #

(>>) :: WithZero a -> WithZero b -> WithZero b #

return :: a -> WithZero a #

fail :: String -> WithZero a #

Functor WithZero Source # 

Methods

fmap :: (a -> b) -> WithZero a -> WithZero b #

(<$) :: a -> WithZero b -> WithZero a #

Applicative WithZero Source # 

Methods

pure :: a -> WithZero a #

(<*>) :: WithZero (a -> b) -> WithZero a -> WithZero b #

liftA2 :: (a -> b -> c) -> WithZero a -> WithZero b -> WithZero c #

(*>) :: WithZero a -> WithZero b -> WithZero b #

(<*) :: WithZero a -> WithZero b -> WithZero a #

Foldable WithZero Source # 

Methods

fold :: Monoid m => WithZero m -> m #

foldMap :: Monoid m => (a -> m) -> WithZero a -> m #

foldr :: (a -> b -> b) -> b -> WithZero a -> b #

foldr' :: (a -> b -> b) -> b -> WithZero a -> b #

foldl :: (b -> a -> b) -> b -> WithZero a -> b #

foldl' :: (b -> a -> b) -> b -> WithZero a -> b #

foldr1 :: (a -> a -> a) -> WithZero a -> a #

foldl1 :: (a -> a -> a) -> WithZero a -> a #

toList :: WithZero a -> [a] #

null :: WithZero a -> Bool #

length :: WithZero a -> Int #

elem :: Eq a => a -> WithZero a -> Bool #

maximum :: Ord a => WithZero a -> a #

minimum :: Ord a => WithZero a -> a #

sum :: Num a => WithZero a -> a #

product :: Num a => WithZero a -> a #

Traversable WithZero Source # 

Methods

traverse :: Applicative f => (a -> f b) -> WithZero a -> f (WithZero b) #

sequenceA :: Applicative f => WithZero (f a) -> f (WithZero a) #

mapM :: Monad m => (a -> m b) -> WithZero a -> m (WithZero b) #

sequence :: Monad m => WithZero (m a) -> m (WithZero a) #

Alternative WithZero Source # 

Methods

empty :: WithZero a #

(<|>) :: WithZero a -> WithZero a -> WithZero a #

some :: WithZero a -> WithZero [a] #

many :: WithZero a -> WithZero [a] #

MonadPlus WithZero Source # 

Methods

mzero :: WithZero a #

mplus :: WithZero a -> WithZero a -> WithZero a #

MonadZip WithZero Source # 

Methods

mzip :: WithZero a -> WithZero b -> WithZero (a, b) #

mzipWith :: (a -> b -> c) -> WithZero a -> WithZero b -> WithZero c #

munzip :: WithZero (a, b) -> (WithZero a, WithZero b) #

Eq a => Eq (WithZero a) Source # 

Methods

(==) :: WithZero a -> WithZero a -> Bool #

(/=) :: WithZero a -> WithZero a -> Bool #

Data a => Data (WithZero a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WithZero a -> c (WithZero a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WithZero a) #

toConstr :: WithZero a -> Constr #

dataTypeOf :: WithZero a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (WithZero a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WithZero a)) #

gmapT :: (forall b. Data b => b -> b) -> WithZero a -> WithZero a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WithZero a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WithZero a -> r #

gmapQ :: (forall d. Data d => d -> u) -> WithZero a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WithZero a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WithZero a -> m (WithZero a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WithZero a -> m (WithZero a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WithZero a -> m (WithZero a) #

Ord a => Ord (WithZero a) Source # 

Methods

compare :: WithZero a -> WithZero a -> Ordering #

(<) :: WithZero a -> WithZero a -> Bool #

(<=) :: WithZero a -> WithZero a -> Bool #

(>) :: WithZero a -> WithZero a -> Bool #

(>=) :: WithZero a -> WithZero a -> Bool #

max :: WithZero a -> WithZero a -> WithZero a #

min :: WithZero a -> WithZero a -> WithZero a #

Read a => Read (WithZero a) Source # 
Show a => Show (WithZero a) Source # 

Methods

showsPrec :: Int -> WithZero a -> ShowS #

show :: WithZero a -> String #

showList :: [WithZero a] -> ShowS #

IsString a => IsString (WithZero a) Source # 

Methods

fromString :: String -> WithZero a #

Generic (WithZero a) Source # 

Associated Types

type Rep (WithZero a) :: * -> * #

Methods

from :: WithZero a -> Rep (WithZero a) x #

to :: Rep (WithZero a) x -> WithZero a #

Semigroup a => Semigroup (WithZero a) Source # 

Methods

(<>) :: WithZero a -> WithZero a -> WithZero a #

sconcat :: NonEmpty (WithZero a) -> WithZero a #

stimes :: Integral b => b -> WithZero a -> WithZero a #

Monoid a => Monoid (WithZero a) Source # 

Methods

mempty :: WithZero a #

mappend :: WithZero a -> WithZero a -> WithZero a #

mconcat :: [WithZero a] -> WithZero a #

Semigroup a => SemigroupWithZero (WithZero a) Source # 

Methods

zero :: WithZero a Source #

Generic1 * WithZero Source # 

Associated Types

type Rep1 WithZero (f :: WithZero -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 WithZero f a #

to1 :: Rep1 WithZero f a -> f a #

type Rep (WithZero a) Source # 
type Rep (WithZero a) = D1 * (MetaData "WithZero" "Coda.Algebra.Zero" "coda-0.0.1-Lrfl9CggVgIC7W2mVql1dH" True) (C1 * (MetaCons "WithZero" PrefixI True) (S1 * (MetaSel (Just Symbol "runWithZero") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe a))))
type Rep1 * WithZero Source # 
type Rep1 * WithZero = D1 * (MetaData "WithZero" "Coda.Algebra.Zero" "coda-0.0.1-Lrfl9CggVgIC7W2mVql1dH" True) (C1 * (MetaCons "WithZero" PrefixI True) (S1 * (MetaSel (Just Symbol "runWithZero") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 * Maybe)))