-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fill-in-the-blanks - A library factoring out substitution from ASTs -- -- Please see the README on GitHub at -- https://github.com/ejconlon/blanks#readme @package blanks @version 0.3.0 module Blanks.Name data Name n a Name :: n -> a -> Name n a [nameKey] :: Name n a -> n [nameValue] :: Name n a -> a type NameOnly n = Name n () instance Data.Traversable.Traversable (Blanks.Name.Name n) instance Data.Foldable.Foldable (Blanks.Name.Name n) instance GHC.Base.Functor (Blanks.Name.Name n) instance (GHC.Show.Show n, GHC.Show.Show a) => GHC.Show.Show (Blanks.Name.Name n a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Blanks.Name.Name n a) module Blanks.RightAdjunct type family RightAdjunct (t :: * -> *) :: * -> * type RightAdjunction (t :: * -> *) = Adjunction t (RightAdjunct t) type RightAdjunctionApplicative t = (RightAdjunction t, Applicative (RightAdjunct t)) module Blanks.Sub newtype Sub a Sub :: Except SubError a -> Sub a [unSub] :: Sub a -> Except SubError a data SubError ApplyError :: !Int -> !Int -> SubError UnboundError :: !Int -> SubError NonBinderError :: SubError class ThrowSub m throwSub :: ThrowSub m => SubError -> m a rethrowSub :: (Applicative m, ThrowSub m) => Either SubError a -> m a runSub :: Sub a -> Either SubError a instance Data.Traversable.Traversable Blanks.Sub.Sub instance Data.Foldable.Foldable Blanks.Sub.Sub instance GHC.Base.Monad Blanks.Sub.Sub instance GHC.Base.Applicative Blanks.Sub.Sub instance GHC.Base.Functor Blanks.Sub.Sub instance GHC.Show.Show Blanks.Sub.SubError instance GHC.Classes.Eq Blanks.Sub.SubError instance Blanks.Sub.ThrowSub Blanks.Sub.Sub instance GHC.Exception.Type.Exception Blanks.Sub.SubError module Blanks.Class class BlankAbstract (m :: * -> *) -- | "free name" blankFree :: BlankAbstract m => a -> BlankCodomain m (m a) -- | "abstract info names body" blankAbstract :: (BlankAbstract m, Eq a) => BlankInfo m -> Seq a -> m a -> BlankCodomain m (m a) -- | blankAbstract for a single argument blankAbstract1 :: (BlankAbstract m, Eq a) => BlankInfo m -> a -> m a -> BlankCodomain m (m a) -- | "unAbstract names body" blankUnAbstract :: BlankAbstract m => Seq a -> m a -> m a blankUnAbstract1 :: BlankAbstract m => a -> m a -> m a -- | "instantiate args body" blankInstantiate :: BlankAbstract m => Seq (BlankCodomain m (m a)) -> m a -> m a -- | blankInstantiate for a single argument blankInstantiate1 :: BlankAbstract m => BlankCodomain m (m a) -> m a -> m a -- | "apply args abstraction" blankApply :: BlankAbstract m => Seq (BlankCodomain m (m a)) -> m a -> Either SubError (m a) -- | blankApply for a single argument blankApply1 :: BlankAbstract m => BlankCodomain m (m a) -> m a -> Either SubError (m a) type family BlankCodomain (m :: * -> *) :: * -> * class BlankEmbed (m :: * -> *) -- | "embed functor" blankEmbed :: BlankEmbed m => BlankFunctor m (m a) -> BlankCodomain m (m a) type family BlankFunctor (m :: * -> *) :: * -> * type family BlankInfo (m :: * -> *) :: * module Blanks.UnderScope data BinderScope n e BinderScope :: !Int -> !n -> !e -> BinderScope n e [binderScopeArity] :: BinderScope n e -> !Int [binderScopeInfo] :: BinderScope n e -> !n [binderScopeBody] :: BinderScope n e -> !e newtype BoundScope BoundScope :: Int -> BoundScope [unBoundScope] :: BoundScope -> Int newtype EmbedScope f e EmbedScope :: f e -> EmbedScope f e [unEmbedScope] :: EmbedScope f e -> f e newtype FreeScope a FreeScope :: a -> FreeScope a [unFreeScope] :: FreeScope a -> a data UnderScope n f e a UnderBoundScope :: !BoundScope -> UnderScope n f e a UnderFreeScope :: !FreeScope a -> UnderScope n f e a UnderBinderScope :: !BinderScope n e -> UnderScope n f e a UnderEmbedScope :: !EmbedScope f e -> UnderScope n f e a data UnderScopeFold n f e a r UnderScopeFold :: (BoundScope -> r) -> (FreeScope a -> r) -> (BinderScope n e -> r) -> (EmbedScope f e -> r) -> UnderScopeFold n f e a r [usfBound] :: UnderScopeFold n f e a r -> BoundScope -> r [usfFree] :: UnderScopeFold n f e a r -> FreeScope a -> r [usfBinder] :: UnderScopeFold n f e a r -> BinderScope n e -> r [usfEmbed] :: UnderScopeFold n f e a r -> EmbedScope f e -> r underScopeFold :: UnderScopeFold n f e a r -> UnderScope n f e a -> r underScopeFoldContraMap :: Functor f => (x -> e) -> UnderScopeFold n f e a r -> UnderScopeFold n f x a r underScopePure :: a -> UnderScope n f e a underScopeShift :: Functor f => (Int -> Int -> e -> e) -> Int -> Int -> UnderScope n f e a -> UnderScope n f e a instance GHC.Base.Functor (Blanks.UnderScope.UnderScopeFold n f e a) instance GHC.Base.Functor (Blanks.UnderScope.UnderScope n f e) instance (GHC.Show.Show a, GHC.Show.Show n, GHC.Show.Show e, GHC.Show.Show (f e)) => GHC.Show.Show (Blanks.UnderScope.UnderScope n f e a) instance (GHC.Classes.Eq a, GHC.Classes.Eq n, GHC.Classes.Eq e, GHC.Classes.Eq (f e)) => GHC.Classes.Eq (Blanks.UnderScope.UnderScope n f e a) instance GHC.Base.Functor f => GHC.Base.Functor (Blanks.UnderScope.EmbedScope f) instance GHC.Show.Show (f e) => GHC.Show.Show (Blanks.UnderScope.EmbedScope f e) instance GHC.Classes.Eq (f e) => GHC.Classes.Eq (Blanks.UnderScope.EmbedScope f e) instance Data.Traversable.Traversable (Blanks.UnderScope.BinderScope n) instance Data.Foldable.Foldable (Blanks.UnderScope.BinderScope n) instance GHC.Base.Functor (Blanks.UnderScope.BinderScope n) instance (GHC.Show.Show n, GHC.Show.Show e) => GHC.Show.Show (Blanks.UnderScope.BinderScope n e) instance (GHC.Classes.Eq n, GHC.Classes.Eq e) => GHC.Classes.Eq (Blanks.UnderScope.BinderScope n e) instance Data.Traversable.Traversable Blanks.UnderScope.FreeScope instance Data.Foldable.Foldable Blanks.UnderScope.FreeScope instance GHC.Base.Functor Blanks.UnderScope.FreeScope instance GHC.Show.Show a => GHC.Show.Show (Blanks.UnderScope.FreeScope a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Blanks.UnderScope.FreeScope a) instance GHC.Show.Show Blanks.UnderScope.BoundScope instance GHC.Classes.Eq Blanks.UnderScope.BoundScope instance GHC.Base.Functor f => Data.Bifunctor.Bifunctor (Blanks.UnderScope.UnderScope n f) instance Data.Foldable.Foldable f => Data.Bifoldable.Bifoldable (Blanks.UnderScope.UnderScope n f) instance Data.Traversable.Traversable f => Data.Bitraversable.Bitraversable (Blanks.UnderScope.UnderScope n f) module Blanks.ScopeT newtype ScopeT t n f a ScopeT :: t (UnderScope n f (ScopeT t n f a) a) -> ScopeT t n f a [unScopeT] :: ScopeT t n f a -> t (UnderScope n f (ScopeT t n f a) a) type ScopeTFold t n f a r = ScopeTRawFold t n f a (RightAdjunct t r) type ScopeTRawFold t n f a r = UnderScopeFold n f (ScopeT t n f a) a r scopeTBind :: (RightAdjunction t, Functor f) => (a -> RightAdjunct t (ScopeT t n f b)) -> ScopeT t n f a -> ScopeT t n f b scopeTEmbed :: RightAdjunction t => f (ScopeT t n f a) -> RightAdjunct t (ScopeT t n f a) scopeTFold :: RightAdjunction t => ScopeTFold t n f a r -> ScopeT t n f a -> r scopeTFree :: RightAdjunction t => a -> RightAdjunct t (ScopeT t n f a) scopeTHoistAnno :: (Functor t, Functor f) => (forall x. t x -> w x) -> ScopeT t n f a -> ScopeT w n f a scopeTLiftAnno :: Functor t => t a -> ScopeT t n f a scopeTRawFold :: Functor t => ScopeTRawFold t n f a r -> ScopeT t n f a -> t r instance GHC.Classes.Eq (t (Blanks.UnderScope.UnderScope n f (Blanks.ScopeT.ScopeT t n f a) a)) => GHC.Classes.Eq (Blanks.ScopeT.ScopeT t n f a) instance GHC.Show.Show (t (Blanks.UnderScope.UnderScope n f (Blanks.ScopeT.ScopeT t n f a) a)) => GHC.Show.Show (Blanks.ScopeT.ScopeT t n f a) instance (GHC.Base.Functor t, GHC.Base.Functor f) => GHC.Base.Functor (Blanks.ScopeT.ScopeT t n f) instance (Data.Foldable.Foldable t, Data.Foldable.Foldable f) => Data.Foldable.Foldable (Blanks.ScopeT.ScopeT t n f) instance (Data.Traversable.Traversable t, Data.Traversable.Traversable f) => Data.Traversable.Traversable (Blanks.ScopeT.ScopeT t n f) instance Blanks.RightAdjunct.RightAdjunction t => Blanks.Class.BlankEmbed (Blanks.ScopeT.ScopeT t n f) instance (Blanks.RightAdjunct.RightAdjunctionApplicative t, GHC.Base.Functor f) => Blanks.Class.BlankAbstract (Blanks.ScopeT.ScopeT t n f) module Blanks.PureScope newtype PureScope n f a PureScope :: ScopeT Identity n f a -> PureScope n f a [unPureScope] :: PureScope n f a -> ScopeT Identity n f a type PureScopeFold n f a r = UnderScopeFold n f (PureScope n f a) a r pureScopeBind :: Functor f => (a -> PureScope n f b) -> PureScope n f a -> PureScope n f b pureScopeEmbed :: Functor f => f (PureScope n f a) -> PureScope n f a pureScopeFold :: Traversable f => PureScopeFold n f a r -> PureScope n f a -> r pureScopeFree :: a -> PureScope n f a instance GHC.Base.Functor f => Blanks.Class.BlankAbstract (Blanks.PureScope.PureScope n f) instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Blanks.PureScope.PureScope n f) instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Blanks.PureScope.PureScope n f) instance GHC.Base.Functor f => GHC.Base.Functor (Blanks.PureScope.PureScope n f) instance GHC.Base.Functor f => GHC.Base.Applicative (Blanks.PureScope.PureScope n f) instance GHC.Base.Functor f => GHC.Base.Monad (Blanks.PureScope.PureScope n f) instance GHC.Base.Functor f => Blanks.Class.BlankEmbed (Blanks.PureScope.PureScope n f) instance (GHC.Classes.Eq (f (Blanks.ScopeT.ScopeT Data.Functor.Identity.Identity n f a)), GHC.Classes.Eq n, GHC.Classes.Eq a) => GHC.Classes.Eq (Blanks.PureScope.PureScope n f a) instance (GHC.Show.Show (f (Blanks.ScopeT.ScopeT Data.Functor.Identity.Identity n f a)), GHC.Show.Show n, GHC.Show.Show a) => GHC.Show.Show (Blanks.PureScope.PureScope n f a) module Blanks.LocScope newtype Colocated l a Colocated :: Reader l a -> Colocated l a [unColocated] :: Colocated l a -> Reader l a data Located l a Located :: !l -> !a -> Located l a [_locatedLoc] :: Located l a -> !l [_locatedVal] :: Located l a -> !a newtype LocScope l n f a LocScope :: ScopeT (Located l) n f a -> LocScope l n f a [unLocScope] :: LocScope l n f a -> ScopeT (Located l) n f a type LocScopeRawFold l n f a r = UnderScopeFold n f (LocScope l n f a) a r type LocScopeFold l n f a r = LocScopeRawFold l n f a (Colocated l r) askColocated :: Colocated l l colocated :: (l -> a) -> Colocated l a locScopeBind :: Functor f => (a -> Colocated l (LocScope l n f b)) -> LocScope l n f a -> LocScope l n f b locScopeEmbed :: Functor f => f (LocScope l n f a) -> Colocated l (LocScope l n f a) locScopeRawFold :: Functor f => LocScopeRawFold l n f a r -> LocScope l n f a -> Located l r locScopeFold :: Functor f => LocScopeFold l n f a r -> LocScope l n f a -> r locScopeFree :: a -> Colocated l (LocScope l n f a) runColocated :: Colocated l a -> l -> a instance GHC.Base.Functor f => Blanks.Class.BlankAbstract (Blanks.LocScope.LocScope l n f) instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Blanks.LocScope.LocScope l n f) instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Blanks.LocScope.LocScope l n f) instance GHC.Base.Functor f => GHC.Base.Functor (Blanks.LocScope.LocScope l n f) instance Data.Functor.Rep.Representable (Blanks.LocScope.Colocated l) instance Control.Monad.Reader.Class.MonadReader l (Blanks.LocScope.Colocated l) instance GHC.Base.Monad (Blanks.LocScope.Colocated l) instance GHC.Base.Applicative (Blanks.LocScope.Colocated l) instance GHC.Base.Functor (Blanks.LocScope.Colocated l) instance Data.Traversable.Traversable (Blanks.LocScope.Located l) instance Data.Foldable.Foldable (Blanks.LocScope.Located l) instance GHC.Base.Functor (Blanks.LocScope.Located l) instance (GHC.Show.Show l, GHC.Show.Show a) => GHC.Show.Show (Blanks.LocScope.Located l a) instance (GHC.Classes.Eq l, GHC.Classes.Eq a) => GHC.Classes.Eq (Blanks.LocScope.Located l a) instance GHC.Base.Functor f => Blanks.Class.BlankEmbed (Blanks.LocScope.LocScope l n f) instance (GHC.Classes.Eq (f (Blanks.ScopeT.ScopeT (Blanks.LocScope.Located l) n f a)), GHC.Classes.Eq l, GHC.Classes.Eq n, GHC.Classes.Eq a) => GHC.Classes.Eq (Blanks.LocScope.LocScope l n f a) instance (GHC.Show.Show (f (Blanks.ScopeT.ScopeT (Blanks.LocScope.Located l) n f a)), GHC.Show.Show l, GHC.Show.Show n, GHC.Show.Show a) => GHC.Show.Show (Blanks.LocScope.LocScope l n f a) instance Data.Distributive.Distributive (Blanks.LocScope.Colocated l) instance Data.Functor.Adjunction.Adjunction (Blanks.LocScope.Located l) (Blanks.LocScope.Colocated l) instance GHC.Base.Monoid l => GHC.Base.Applicative (Blanks.LocScope.Located l) instance GHC.Base.Monoid l => GHC.Base.Monad (Blanks.LocScope.Located l) module Blanks