Module

Bound

Package
purescript-bound
Repository
benjamin-hodgson/purescript-bound

#substitute Source

substitute :: forall a f. Monad f => Eq a => a -> f a -> f a -> f a

#substituteVar Source

substituteVar :: forall a f. Functor f => Eq a => a -> a -> f a -> f a

#closed Source

closed :: forall b a f. Traversable f => f a -> Maybe (f b)

#Bound Source

class Bound t  where

Members

  • subst :: forall c a f. Monad f => (a -> f c) -> t f a -> t f c

Instances

#substDefault Source

substDefault :: forall c a f t. MonadTrans t => Monad f => Monad (t f) => (a -> f c) -> t f a -> t f c

#flipSubst Source

flipSubst :: forall c a t f. Bound t => Monad f => t f a -> (a -> f c) -> t f c

#(=<<<) Source

Operator alias for Bound.subst (left-associative / precedence 1)

#(>>>=) Source

Operator alias for Bound.flipSubst (right-associative / precedence 1)

#Var Source

data Var b a

Constructors

Instances

#Scope Source

newtype Scope b f a

Constructors

Instances

#unScope Source

unScope :: forall a f b. Scope b f a -> f (Var b (f a))

#fromScope Source

fromScope :: forall a f b. Monad f => Scope b f a -> f (Var b a)

#toScope Source

toScope :: forall a f b. Monad f => f (Var b a) -> Scope b f a

#abstract Source

abstract :: forall f b a. Monad f => (a -> Maybe b) -> f a -> Scope b f a

#abstract1 Source

abstract1 :: forall f a. Eq a => Monad f => a -> f a -> Scope Unit f a

#instantiate Source

instantiate :: forall f b a. Monad f => (b -> f a) -> Scope b f a -> f a

#instantiate1 Source

instantiate1 :: forall f b a. Monad f => f a -> Scope b f a -> f a

#splat Source

splat :: forall f c b a. Monad f => (a -> f c) -> (b -> f c) -> Scope b f a -> f c

#bindings Source

bindings :: forall f b a. Foldable f => Scope b f a -> Array b

#mapBound Source

mapBound :: forall f c b a. Functor f => (b -> c) -> Scope b f a -> Scope c f a

#mapScope Source

mapScope :: forall f d c b a. Functor f => (b -> d) -> (a -> c) -> Scope b f a -> Scope d f c

#foldMapBound Source

foldMapBound :: forall f m b a. Foldable f => Monoid m => (b -> m) -> Scope b f a -> m

#foldMapScope Source

foldMapScope :: forall f m b a. Foldable f => Monoid m => (b -> m) -> (a -> m) -> Scope b f a -> m

#traverseBound Source

traverseBound :: forall m f c b a. Traversable f => Applicative m => (b -> m c) -> Scope b f a -> m (Scope c f a)

#traverseScope Source

traverseScope :: forall m f d c b a. Traversable f => Applicative m => (b -> m d) -> (a -> m c) -> Scope b f a -> m (Scope d f c)

#traverseBound_ Source

traverseBound_ :: forall m f c b a. Foldable f => Applicative m => (b -> m c) -> Scope b f a -> m Unit

#traverseScope_ Source

traverseScope_ :: forall m f d c b a. Foldable f => Applicative m => (b -> m d) -> (a -> m c) -> Scope b f a -> m Unit

#hoistScope Source

hoistScope :: forall b a g f. Functor f => (forall x. f x -> g x) -> Scope b f a -> Scope b g a
Modules
Bound