Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bound "prelude" for Language.PTS.
Synopsis
- class Bound (t :: (* -> *) -> * -> *) where
- data Var b a
- unvar :: (b -> r) -> (a -> r) -> Var b a -> r
- newtype Scope b (f :: * -> *) a = Scope {}
- fromScope :: Scope b f a -> f (Var b a)
- toScope :: f (Var b a) -> Scope b f a
- abstract :: Functor f => (a -> Maybe b) -> f a -> Scope b f a
- abstract1Sym :: Functor f => Sym -> f Sym -> Scope IrrSym f Sym
- instantiate1 :: Monad f => f a -> Scope n f a -> f a
- instantiate1return :: Functor f => a -> Scope IrrSym f a -> f a
- instantiate2 :: Monad f => f a -> f a -> Scope IrrSym2 f a -> f a
- instantiate2return :: Functor f => a -> a -> Scope IrrSym2 f a -> f a
- instantiate3 :: Monad f => f a -> f a -> f a -> Scope IrrSym3 f a -> f a
- instantiate3return :: Functor f => a -> a -> a -> Scope IrrSym3 f a -> f a
- bindings :: Foldable f => Scope b f a -> [b]
- transverseScope :: Functor f => (forall r. g r -> f (h r)) -> Scope b g a -> f (Scope b h a)
- liftS :: Functor m => m a -> Scope n m a
- unusedScope :: Traversable m => Scope n m a -> Maybe (m a)
- newtype ScopeH b (f :: * -> *) (m :: * -> *) a = ScopeH {}
- fromScopeH :: Module f m => ScopeH b f m a -> f (Var b a)
- abstractH :: (Functor f, Monad m) => (a -> Maybe b) -> f a -> ScopeH b f m a
- abstractHEither :: (Functor f, Monad m) => (a -> Either b c) -> f a -> ScopeH b f m c
- abstract1HSym :: (Functor f, Monad m) => Sym -> f Sym -> ScopeH IrrSym f m Sym
- abstract2HSym :: (Functor f, Monad m) => Sym -> Sym -> f Sym -> ScopeH IrrSym2 f m Sym
- abstract3HSym :: (Functor f, Monad m) => Sym -> Sym -> Sym -> f Sym -> ScopeH IrrSym3 f m Sym
- instantiate1H :: Module f m => m a -> ScopeH b f m a -> f a
- instantiate1Hreturn :: Module f m => a -> ScopeH IrrSym f m a -> f a
- instantiate2H :: Module f m => m a -> m a -> ScopeH IrrSym2 f m a -> f a
- instantiate2Hreturn :: Module f m => a -> a -> ScopeH IrrSym2 f m a -> f a
- instantiate3H :: Module f m => m a -> m a -> m a -> ScopeH IrrSym3 f m a -> f a
- instantiate3Hreturn :: Module f m => a -> a -> a -> ScopeH IrrSym3 f m a -> f a
- instantiateHEither :: Module f m => (Either b a -> m c) -> ScopeH b f m a -> f c
- bindingsH :: Foldable f => ScopeH b f m a -> [b]
- liftH :: (Functor f, Monad m) => f a -> ScopeH n f m a
- class (Functor f, Monad m) => Module (f :: * -> *) (m :: * -> *) where
Documentation
Variable
Instances
Bitraversable Var | |
Defined in Bound.Var bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Var a b -> f (Var c d) Source # | |
Bifoldable Var | |
Bifunctor Var | |
Eq2 Var | |
Ord2 Var | |
Read2 Var | |
Defined in Bound.Var liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Var a b) Source # liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Var a b] Source # liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Var a b) Source # liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Var a b] Source # | |
Show2 Var | |
Hashable2 Var | |
Serial2 Var | |
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) | |
Monad (Var b) | |
Functor (Var b) | |
Applicative (Var b) | |
Foldable (Var b) | |
Defined in Bound.Var fold :: Monoid m => Var b m -> m Source # foldMap :: Monoid m => (a -> m) -> Var b a -> m Source # foldr :: (a -> b0 -> b0) -> b0 -> Var b a -> b0 Source # foldr' :: (a -> b0 -> b0) -> b0 -> Var b a -> b0 Source # foldl :: (b0 -> a -> b0) -> b0 -> Var b a -> b0 Source # foldl' :: (b0 -> a -> b0) -> b0 -> Var b a -> b0 Source # foldr1 :: (a -> a -> a) -> Var b a -> a Source # foldl1 :: (a -> a -> a) -> Var b a -> a Source # toList :: Var b a -> [a] Source # null :: Var b a -> Bool Source # length :: Var b a -> Int Source # elem :: Eq a => a -> Var b a -> Bool Source # maximum :: Ord a => Var b a -> a Source # minimum :: Ord a => Var b a -> a Source # | |
Traversable (Var b) | |
Eq b => Eq1 (Var b) | |
Ord b => Ord1 (Var b) | |
Read b => Read1 (Var b) | |
Defined in Bound.Var liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Var b a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Var b a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Var b a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Var b a] Source # | |
Show b => Show1 (Var b) | |
Hashable b => Hashable1 (Var b) | |
Serial b => Serial1 (Var b) | |
Defined in Bound.Var serializeWith :: MonadPut m => (a -> m ()) -> Var b a -> m () deserializeWith :: MonadGet m => m a -> m (Var b a) | |
PrettyPrec a => PrettyPrec1 (Var a) Source # | |
Generic1 (Var b :: * -> *) | |
(Eq b, Eq a) => Eq (Var b a) | |
(Data b, Data a) => Data (Var b a) | |
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) Source # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Var b a) Source # toConstr :: Var b a -> Constr Source # dataTypeOf :: Var b a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Var b a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Var b a)) Source # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Var b a -> Var b a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var b a -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var b a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Var b a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var b a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var b a -> m (Var b a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var b a -> m (Var b a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var b a -> m (Var b a) Source # | |
(Ord b, Ord a) => Ord (Var b a) | |
(Read b, Read a) => Read (Var b a) | |
(Show b, Show a) => Show (Var b a) | |
Generic (Var b a) | |
(Binary b, Binary a) => Binary (Var b a) | |
(NFData a, NFData b) => NFData (Var b a) | |
(Hashable b, Hashable a) => Hashable (Var b a) | |
(Serial b, Serial a) => Serial (Var b a) | |
Defined in Bound.Var serialize :: MonadPut m => Var b a -> m () deserialize :: MonadGet m => m (Var b a) | |
(Serialize b, Serialize a) => Serialize (Var b a) | |
(PrettyPrec a, PrettyPrec b) => PrettyPrec (Var a b) Source # | |
type Rep1 (Var b :: * -> *) | |
Defined in Bound.Var type Rep1 (Var b :: * -> *) = D1 (MetaData "Var" "Bound.Var" "bound-2.0.1-b2119def9c5a269bc73b65a6a2993a468736abb7bf396de0d95b9467a5bdf60e" 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) | |
Defined in Bound.Var type Rep (Var b a) = D1 (MetaData "Var" "Bound.Var" "bound-2.0.1-b2119def9c5a269bc73b65a6a2993a468736abb7bf396de0d95b9467a5bdf60e" 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))) |
Scope (simple)
newtype Scope b (f :: * -> *) a #
Instances
MonadTrans (Scope b) | |
Bound (Scope b) | |
MFunctor (Scope b :: (* -> *) -> * -> *) | |
Defined in Bound.Scope.Simple | |
Functor f => Generic1 (Scope b f :: * -> *) | |
Monad f => Monad (Scope b f) | |
Functor f => Functor (Scope b f) | |
Monad f => Applicative (Scope b f) | |
Defined in Bound.Scope.Simple | |
Foldable f => Foldable (Scope b f) | |
Defined in Bound.Scope.Simple fold :: Monoid m => Scope b f m -> m Source # foldMap :: Monoid m => (a -> m) -> Scope b f a -> m Source # foldr :: (a -> b0 -> b0) -> b0 -> Scope b f a -> b0 Source # foldr' :: (a -> b0 -> b0) -> b0 -> Scope b f a -> b0 Source # foldl :: (b0 -> a -> b0) -> b0 -> Scope b f a -> b0 Source # foldl' :: (b0 -> a -> b0) -> b0 -> Scope b f a -> b0 Source # foldr1 :: (a -> a -> a) -> Scope b f a -> a Source # foldl1 :: (a -> a -> a) -> Scope b f a -> a Source # toList :: Scope b f a -> [a] Source # null :: Scope b f a -> Bool Source # length :: Scope b f a -> Int Source # elem :: Eq a => a -> Scope b f a -> Bool Source # maximum :: Ord a => Scope b f a -> a Source # minimum :: Ord a => Scope b f a -> a Source # | |
Traversable f => Traversable (Scope b f) | |
Defined in Bound.Scope.Simple traverse :: Applicative f0 => (a -> f0 b0) -> Scope b f a -> f0 (Scope b f b0) Source # sequenceA :: Applicative f0 => Scope b f (f0 a) -> f0 (Scope b f a) Source # mapM :: Monad m => (a -> m b0) -> Scope b f a -> m (Scope b f b0) Source # sequence :: Monad m => Scope b f (m a) -> m (Scope b f a) Source # | |
(Eq b, Eq1 f) => Eq1 (Scope b f) | |
(Ord b, Ord1 f) => Ord1 (Scope b f) | |
Defined in Bound.Scope.Simple | |
(Read b, Read1 f) => Read1 (Scope b f) | |
Defined in Bound.Scope.Simple liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Scope b f a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Scope b f a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Scope b f a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Scope b f a] Source # | |
(Show b, Show1 f) => Show1 (Scope b f) | |
(Hashable b, Hashable1 f) => Hashable1 (Scope b f) | |
Defined in Bound.Scope.Simple | |
(Serial b, Serial1 f) => Serial1 (Scope b f) | |
Defined in Bound.Scope.Simple serializeWith :: MonadPut m => (a -> m ()) -> Scope b f a -> m () deserializeWith :: MonadGet m => m a -> m (Scope b f a) | |
(Eq b, Eq1 f, Eq a) => Eq (Scope b f a) | |
(Typeable b, Typeable f, Data a, Data (f (Var b a))) => Data (Scope b f a) | |
Defined in Bound.Scope.Simple gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Scope b f a -> c (Scope b f a) Source # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Scope b f a) Source # toConstr :: Scope b f a -> Constr Source # dataTypeOf :: Scope b f a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Scope b f a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Scope b f a)) Source # gmapT :: (forall b0. Data b0 => b0 -> b0) -> Scope b f a -> Scope b f a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scope b f a -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scope b f a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Scope b f a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Scope b f a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scope b f a -> m (Scope b f a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scope b f a -> m (Scope b f a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scope b f a -> m (Scope b f a) Source # | |
(Ord b, Ord1 f, Ord a) => Ord (Scope b f a) | |
Defined in Bound.Scope.Simple compare :: Scope b f a -> Scope b f a -> Ordering Source # (<) :: Scope b f a -> Scope b f a -> Bool Source # (<=) :: Scope b f a -> Scope b f a -> Bool Source # (>) :: Scope b f a -> Scope b f a -> Bool Source # (>=) :: Scope b f a -> Scope b f a -> Bool Source # | |
(Read b, Read1 f, Read a) => Read (Scope b f a) | |
(Show b, Show1 f, Show a) => Show (Scope b f a) | |
Generic (Scope b f a) | |
(Binary b, Serial1 f, Binary a) => Binary (Scope b f a) | |
NFData (f (Var b a)) => NFData (Scope b f a) | |
Defined in Bound.Scope.Simple | |
(Hashable b, Hashable1 f, Hashable a) => Hashable (Scope b f a) | |
Defined in Bound.Scope.Simple | |
(Serial b, Serial1 f, Serial a) => Serial (Scope b f a) | |
Defined in Bound.Scope.Simple serialize :: MonadPut m => Scope b f a -> m () deserialize :: MonadGet m => m (Scope b f a) | |
(Serialize b, Serial1 f, Serialize a) => Serialize (Scope b f a) | |
Defined in Bound.Scope.Simple | |
type Rep1 (Scope b f :: * -> *) | |
Defined in Bound.Scope.Simple type Rep1 (Scope b f :: * -> *) = D1 (MetaData "Scope" "Bound.Scope.Simple" "bound-2.0.1-b2119def9c5a269bc73b65a6a2993a468736abb7bf396de0d95b9467a5bdf60e" True) (C1 (MetaCons "Scope" PrefixI True) (S1 (MetaSel (Just "unscope") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (f :.: Rec1 (Var b)))) | |
type Rep (Scope b f a) | |
Defined in Bound.Scope.Simple |
instantiate1 :: Monad f => f a -> Scope n f a -> f a #
transverseScope :: Functor f => (forall r. g r -> f (h r)) -> Scope b g a -> f (Scope b h a) #
unusedScope :: Traversable m => Scope n m a -> Maybe (m a) Source #
ScopeH
newtype ScopeH b (f :: * -> *) (m :: * -> *) a #
Instances
(Functor f, Functor m) => Functor (ScopeH b f m) | |
(Foldable f, Foldable m) => Foldable (ScopeH b f m) | |
Defined in Bound.ScopeH fold :: Monoid m0 => ScopeH b f m m0 -> m0 Source # foldMap :: Monoid m0 => (a -> m0) -> ScopeH b f m a -> m0 Source # foldr :: (a -> b0 -> b0) -> b0 -> ScopeH b f m a -> b0 Source # foldr' :: (a -> b0 -> b0) -> b0 -> ScopeH b f m a -> b0 Source # foldl :: (b0 -> a -> b0) -> b0 -> ScopeH b f m a -> b0 Source # foldl' :: (b0 -> a -> b0) -> b0 -> ScopeH b f m a -> b0 Source # foldr1 :: (a -> a -> a) -> ScopeH b f m a -> a Source # foldl1 :: (a -> a -> a) -> ScopeH b f m a -> a Source # toList :: ScopeH b f m a -> [a] Source # null :: ScopeH b f m a -> Bool Source # length :: ScopeH b f m a -> Int Source # elem :: Eq a => a -> ScopeH b f m a -> Bool Source # maximum :: Ord a => ScopeH b f m a -> a Source # minimum :: Ord a => ScopeH b f m a -> a Source # | |
(Traversable f, Traversable m) => Traversable (ScopeH b f m) | |
Defined in Bound.ScopeH traverse :: Applicative f0 => (a -> f0 b0) -> ScopeH b f m a -> f0 (ScopeH b f m b0) Source # sequenceA :: Applicative f0 => ScopeH b f m (f0 a) -> f0 (ScopeH b f m a) Source # mapM :: Monad m0 => (a -> m0 b0) -> ScopeH b f m a -> m0 (ScopeH b f m b0) Source # sequence :: Monad m0 => ScopeH b f m (m0 a) -> m0 (ScopeH b f m a) Source # | |
(Module f m, Eq b, Eq1 f, Eq1 m) => Eq1 (ScopeH b f m) | |
(Module f m, Ord b, Ord1 f, Ord1 m) => Ord1 (ScopeH b f m) | |
Defined in Bound.ScopeH | |
(Read b, Read1 f, Read1 m) => Read1 (ScopeH b f m) | |
Defined in Bound.ScopeH liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ScopeH b f m a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ScopeH b f m a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ScopeH b f m a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ScopeH b f m a] Source # | |
(Show b, Show1 f, Show1 m) => Show1 (ScopeH b f m) | |
(Hashable b, Module f m, Hashable1 f, Hashable1 m) => Hashable1 (ScopeH b f m) | |
Defined in Bound.ScopeH | |
(Functor f, Monad m) => Module (ScopeH b f m) m | |
Defined in Bound.ScopeH | |
(Module f m, Eq b, Eq1 f, Eq1 m, Eq a) => Eq (ScopeH b f m a) | |
(Module f m, Ord b, Ord1 f, Ord1 m, Ord a) => Ord (ScopeH b f m a) | |
Defined in Bound.ScopeH compare :: ScopeH b f m a -> ScopeH b f m a -> Ordering Source # (<) :: ScopeH b f m a -> ScopeH b f m a -> Bool Source # (<=) :: ScopeH b f m a -> ScopeH b f m a -> Bool Source # (>) :: ScopeH b f m a -> ScopeH b f m a -> Bool Source # (>=) :: ScopeH b f m a -> ScopeH b f m a -> Bool Source # max :: ScopeH b f m a -> ScopeH b f m a -> ScopeH b f m a Source # min :: ScopeH b f m a -> ScopeH b f m a -> ScopeH b f m a Source # | |
(Read b, Read1 f, Read1 m, Read a) => Read (ScopeH b f m a) | |
(Show b, Show1 f, Show1 m, Show a) => Show (ScopeH b f m a) | |
NFData (f (Var b (m a))) => NFData (ScopeH b f m a) | |
Defined in Bound.ScopeH | |
(Hashable b, Module f m, Hashable1 f, Hashable1 m, Hashable a) => Hashable (ScopeH b f m a) | |
Defined in Bound.ScopeH |
fromScopeH :: Module f m => ScopeH b f m a -> f (Var b a) #
abstract1HSym :: (Functor f, Monad m) => Sym -> f Sym -> ScopeH IrrSym f m Sym Source #
Abstract over a single variable
abstract2HSym :: (Functor f, Monad m) => Sym -> Sym -> f Sym -> ScopeH IrrSym2 f m Sym Source #
Abstract over two variables
abstract3HSym :: (Functor f, Monad m) => Sym -> Sym -> Sym -> f Sym -> ScopeH IrrSym3 f m Sym Source #
Abstract over tree variables
instantiate1H :: Module f m => m a -> ScopeH b f m a -> f a #
instantiateHEither :: Module f m => (Either b a -> m c) -> ScopeH b f m a -> f c #
Module
class (Functor f, Monad m) => Module (f :: * -> *) (m :: * -> *) where #
Instances
Monad m => Module m Identity | |
Defined in Control.Monad.Module | |
Module (TermChk s) (TermInf s) # | |
Module (TermInf s) (TermInf s) # | |
Monad m => Module (Scope b m) m | |
Defined in Control.Monad.Module | |
(PrettyPrec err, AsErr err, Specification s) => Module (ValueIntro err s) (ValueElim err s) # | |
Defined in Language.PTS.Value (>>==) :: ValueIntro err s a -> (a -> ValueElim err s b) -> ValueIntro err s b # | |
(Functor f, Monad m) => Module (ScopeH b f m) m | |
Defined in Bound.ScopeH |