Copyright | (C) 2012 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell98 |
Documentation
"I am not a number, I am a free monad!"
A
is a variable that may either be "bound" (Var
b aB
) or "free" (F
).
(It is also technically a free monad in the same near-trivial sense as
Either
.)
Instances
Bitraversable Var Source # | |
Defined in Bound.Var bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Var a b -> f (Var c d) # | |
Bifoldable Var Source # | |
Bifunctor Var Source # | |
Eq2 Var Source # | |
Ord2 Var Source # | |
Read2 Var Source # | |
Defined in Bound.Var liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Var a b) # liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Var a b] # liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Var a b) # liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Var a b] # | |
Show2 Var Source # | |
Serial2 Var Source # | |
Defined in Bound.Var serializeWith2 :: MonadPut m => (a -> m ()) -> (b -> m ()) -> Var a b -> m () # deserializeWith2 :: MonadGet m => m a -> m b -> m (Var a b) # | |
Hashable2 Var Source # | |
Monad (Var b) Source # | |
Functor (Var b) Source # | |
Applicative (Var b) Source # | |
Foldable (Var b) Source # | |
Defined in Bound.Var fold :: Monoid m => Var b m -> m # foldMap :: Monoid m => (a -> m) -> Var b a -> m # foldr :: (a -> b0 -> b0) -> b0 -> Var b a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> Var b a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> Var b a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> Var b a -> b0 # foldr1 :: (a -> a -> a) -> Var b a -> a # foldl1 :: (a -> a -> a) -> Var b a -> a # elem :: Eq a => a -> Var b a -> Bool # maximum :: Ord a => Var b a -> a # minimum :: Ord a => Var b a -> a # | |
Traversable (Var b) Source # | |
Eq b => Eq1 (Var b) Source # | |
Ord b => Ord1 (Var b) Source # | |
Read b => Read1 (Var b) Source # | |
Show b => Show1 (Var b) Source # | |
Serial b => Serial1 (Var b) Source # | |
Defined in Bound.Var serializeWith :: MonadPut m => (a -> m ()) -> Var b a -> m () # deserializeWith :: MonadGet m => m a -> m (Var b a) # | |
Hashable b => Hashable1 (Var b) Source # | |
Generic1 (Var b :: Type -> Type) Source # | |
(Eq b, Eq a) => Eq (Var b a) Source # | |
(Data b, Data a) => Data (Var b a) Source # | |
Defined in Bound.Var gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Var b a -> c (Var b a) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Var b a) # toConstr :: Var b a -> Constr # dataTypeOf :: Var b a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Var b a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Var b a)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Var b a -> Var b a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var b a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var b a -> r # gmapQ :: (forall d. Data d => d -> u) -> Var b a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var b a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var b a -> m (Var b a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var b a -> m (Var b a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var b a -> m (Var b a) # | |
(Ord b, Ord a) => Ord (Var b a) Source # | |
(Read b, Read a) => Read (Var b a) Source # | |
(Show b, Show a) => Show (Var b a) Source # | |
Generic (Var b a) Source # | |
(Binary b, Binary a) => Binary (Var b a) Source # | |
(Serial b, Serial a) => Serial (Var b a) Source # | |
(Serialize b, Serialize a) => Serialize (Var b a) Source # | |
(NFData a, NFData b) => NFData (Var b a) Source # | |
(Hashable b, Hashable a) => Hashable (Var b a) Source # | |
type Rep1 (Var b :: Type -> Type) Source # | |
Defined in Bound.Var type Rep1 (Var b :: Type -> Type) = D1 (MetaData "Var" "Bound.Var" "bound-2.0.1-AtZsY3yZaEKLBfeR1JA5NI" False) (C1 (MetaCons "B" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 b)) :+: C1 (MetaCons "F" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) | |
type Rep (Var b a) Source # | |
Defined in Bound.Var type Rep (Var b a) = D1 (MetaData "Var" "Bound.Var" "bound-2.0.1-AtZsY3yZaEKLBfeR1JA5NI" False) (C1 (MetaCons "B" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 b)) :+: C1 (MetaCons "F" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) |