Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype ScopeT n t f a = ScopeT {}
- (>>>>=) :: (Monad f, Functor (t f)) => ScopeT n t f a -> (a -> f b) -> ScopeT n t f b
- abstractT :: (Functor (t f), Monad f) => (a -> Maybe n) -> t f a -> ScopeT n t f a
- abstract1T :: (Functor (t f), Monad f, Eq a) => a -> t f a -> ScopeT () t f a
- abstractTName :: (Functor (t f), Monad f) => (a -> Maybe b) -> t f a -> ScopeT (Name a b) t f a
- abstract1TName :: (Functor (t f), Monad f, Eq a) => a -> t f a -> ScopeT (Name a ()) t f a
- instantiateT :: (Bound t, Monad f) => (n -> f a) -> ScopeT n t f a -> t f a
- instantiate1T :: (Bound t, Monad f) => f a -> ScopeT n t f a -> t f a
- fromScopeT :: (Bound t, Monad f) => ScopeT n t f a -> t f (Var n a)
- toScopeT :: (Functor (t f), Monad f) => t f (Var n a) -> ScopeT n t f a
- lowerScopeT :: Functor (t f) => (forall x. t f x -> g x) -> (forall x. f x -> g x) -> ScopeT n t f a -> Scope n g a
- bindingsT :: Foldable (t f) => ScopeT b t f a -> [b]
Documentation
newtype ScopeT n t f a Source #
`'Scope n' ~ ScopeT
n Identity'
.
(Functor (t f), Functor f) => Functor (ScopeT n t f) Source # | |
(Foldable (t f), Foldable f) => Foldable (ScopeT n t f) Source # | |
(Traversable (t f), Traversable f) => Traversable (ScopeT n t f) Source # | |
(Show n, Show1 (t f), Show1 f) => Show1 (ScopeT n t f) Source # | |
(PrettyPrec n, PrettyPrec1 (t f), PrettyPrec1 f) => PrettyPrec1 (ScopeT n t f) Source # | |
(Show n, Show1 (t f), Show1 f, Show a) => Show (ScopeT n t f a) Source # | |
(>>>>=) :: (Monad f, Functor (t f)) => ScopeT n t f a -> (a -> f b) -> ScopeT n t f b infixl 1 Source #
abstract1T :: (Functor (t f), Monad f, Eq a) => a -> t f a -> ScopeT () t f a Source #
Abstract over a single variable.
>>>
abstract1T 'x' (MaybeT (Nothing : map Just "xyz"))
ScopeT (MaybeT [Nothing,Just (B ()),Just (F "y"),Just (F "z")])
abstractTName :: (Functor (t f), Monad f) => (a -> Maybe b) -> t f a -> ScopeT (Name a b) t f a Source #
Abstraction, capturing named bound variables.
abstract1TName :: (Functor (t f), Monad f, Eq a) => a -> t f a -> ScopeT (Name a ()) t f a Source #
Abstract over a single variable
lowerScopeT :: Functor (t f) => (forall x. t f x -> g x) -> (forall x. f x -> g x) -> ScopeT n t f a -> Scope n g a Source #
bindingsT :: Foldable (t f) => ScopeT b t f a -> [b] Source #
Return a list of occurences of the variables bound by this Scope
.
>>>
import Control.Monad.Trans.Maybe