-- 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.5.0
-- | Internals.
module Blanks.Core
newtype BoundScope
BoundScope :: Int -> BoundScope
[unBoundScope] :: BoundScope -> Int
newtype FreeScope a
FreeScope :: a -> FreeScope a
[unFreeScope] :: FreeScope a -> a
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 EmbedScope f e
EmbedScope :: f e -> EmbedScope f e
[unEmbedScope] :: EmbedScope f e -> f e
instance Control.DeepSeq.NFData (f e) => Control.DeepSeq.NFData (Blanks.Core.EmbedScope f e)
instance GHC.Base.Functor f => GHC.Base.Functor (Blanks.Core.EmbedScope f)
instance GHC.Show.Show (f e) => GHC.Show.Show (Blanks.Core.EmbedScope f e)
instance GHC.Classes.Eq (f e) => GHC.Classes.Eq (Blanks.Core.EmbedScope f e)
instance (Control.DeepSeq.NFData n, Control.DeepSeq.NFData e) => Control.DeepSeq.NFData (Blanks.Core.BinderScope n e)
instance GHC.Generics.Generic (Blanks.Core.BinderScope n e)
instance Data.Traversable.Traversable (Blanks.Core.BinderScope n)
instance Data.Foldable.Foldable (Blanks.Core.BinderScope n)
instance GHC.Base.Functor (Blanks.Core.BinderScope n)
instance (GHC.Show.Show n, GHC.Show.Show e) => GHC.Show.Show (Blanks.Core.BinderScope n e)
instance (GHC.Classes.Eq n, GHC.Classes.Eq e) => GHC.Classes.Eq (Blanks.Core.BinderScope n e)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Blanks.Core.FreeScope a)
instance Data.Traversable.Traversable Blanks.Core.FreeScope
instance Data.Foldable.Foldable Blanks.Core.FreeScope
instance GHC.Base.Functor Blanks.Core.FreeScope
instance GHC.Show.Show a => GHC.Show.Show (Blanks.Core.FreeScope a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Blanks.Core.FreeScope a)
instance Control.DeepSeq.NFData Blanks.Core.BoundScope
instance GHC.Show.Show Blanks.Core.BoundScope
instance GHC.Classes.Eq Blanks.Core.BoundScope
module Blanks.Located
-- | Because we defined a unique left adjoint, we have to define the unique
-- right.
newtype Colocated l a
Colocated :: Reader l a -> Colocated l a
[unColocated] :: Colocated l a -> Reader l a
-- | This is basically the Env comonad, but with the env strict.
-- It's also basically the Writer monad in certain contexts. We
-- define a new, non-transforming datatype so we can pattern-match.
data Located l a
Located :: !l -> a -> Located l a
[locatedLoc] :: Located l a -> !l
[locatedVal] :: Located l a -> a
askColocated :: Colocated l l
colocated :: (l -> a) -> Colocated l a
runColocated :: Colocated l a -> l -> a
instance Data.Functor.Rep.Representable (Blanks.Located.Colocated l)
instance Control.Monad.Reader.Class.MonadReader l (Blanks.Located.Colocated l)
instance GHC.Base.Monad (Blanks.Located.Colocated l)
instance GHC.Base.Applicative (Blanks.Located.Colocated l)
instance GHC.Base.Functor (Blanks.Located.Colocated l)
instance (Control.DeepSeq.NFData l, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Blanks.Located.Located l a)
instance GHC.Generics.Generic (Blanks.Located.Located l a)
instance Data.Traversable.Traversable (Blanks.Located.Located l)
instance Data.Foldable.Foldable (Blanks.Located.Located l)
instance GHC.Base.Functor (Blanks.Located.Located l)
instance (GHC.Show.Show l, GHC.Show.Show a) => GHC.Show.Show (Blanks.Located.Located l a)
instance (GHC.Classes.Eq l, GHC.Classes.Eq a) => GHC.Classes.Eq (Blanks.Located.Located l a)
instance Data.Distributive.Distributive (Blanks.Located.Colocated l)
instance Data.Functor.Adjunction.Adjunction (Blanks.Located.Located l) (Blanks.Located.Colocated l)
instance GHC.Base.Monoid l => GHC.Base.Applicative (Blanks.Located.Located l)
instance GHC.Base.Monoid l => GHC.Base.Monad (Blanks.Located.Located l)
instance GHC.Base.Monoid l => Control.Monad.Writer.Class.MonadWriter l (Blanks.Located.Located l)
module Blanks.Name
-- | Name is compared on value only, allowing you to define and use
-- things like NameOnly in your BlankInfo values to make
-- alpha-equivalent terms structurally (Eq) equivalent.
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 ()
pattern NameOnly :: n -> NameOnly n
instance (Control.DeepSeq.NFData n, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Blanks.Name.Name n a)
instance GHC.Generics.Generic (Blanks.Name.Name n a)
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.NatNewtype
-- | A "natural isomorphism" between two functors, like exists derivably
-- between newtyped functors and their wrapped types. The functional
-- dependency requires that g be the newtype and m the
-- wrapped type.
class (forall a. Coercible (m a) (g a), forall a. Coercible (g a) (m a)) => NatNewtype (m :: Type -> Type) (g :: Type -> Type) | g -> m
-- | Coerce from the newtype to the wrapped type.
natNewtypeFrom :: NatNewtype m g => g a -> m a
-- | Coerce from the wrapped type to the newtype.
natNewtypeTo :: NatNewtype m g => m a -> g a
module Blanks.Sub
-- | Errors that happen in the course of instantiation, thrown by
-- blankApply and related functions.
data SubError
ApplyError :: !Int -> !Int -> SubError
UnboundError :: !Int -> SubError
NonBinderError :: SubError
-- | Some monadic context that lets you throw a SubError. Exists to
-- let you rethrow to a more convenient context rather than pattern
-- maching.
class ThrowSub m
throwSub :: ThrowSub m => SubError -> m a
rethrowSub :: (Applicative m, ThrowSub m) => Either SubError a -> m a
instance GHC.Show.Show Blanks.Sub.SubError
instance GHC.Classes.Eq Blanks.Sub.SubError
instance Blanks.Sub.ThrowSub (Data.Either.Either Blanks.Sub.SubError)
instance Blanks.Sub.ThrowSub GHC.Types.IO
instance GHC.Exception.Type.Exception Blanks.Sub.SubError
-- | Internals.
module Blanks.Under
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
pattern UnderScopeBound :: Int -> UnderScope n f e a
pattern UnderScopeFree :: a -> UnderScope n f e a
pattern UnderScopeBinder :: Int -> n -> e -> UnderScope n f e a
pattern UnderScopeEmbed :: f e -> 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 (Control.DeepSeq.NFData a, Control.DeepSeq.NFData n, Control.DeepSeq.NFData e, Control.DeepSeq.NFData (f e)) => Control.DeepSeq.NFData (Blanks.Under.UnderScope n f e a)
instance GHC.Generics.Generic (Blanks.Under.UnderScope n f e a)
instance GHC.Base.Functor (Blanks.Under.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.Under.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.Under.UnderScope n f e a)
instance GHC.Base.Functor f => Data.Bifunctor.Bifunctor (Blanks.Under.UnderScope n f)
instance Data.Foldable.Foldable f => Data.Bifoldable.Bifoldable (Blanks.Under.UnderScope n f)
instance Data.Traversable.Traversable f => Data.Bitraversable.Bitraversable (Blanks.Under.UnderScope n f)
-- | Internals.
module Blanks.ScopeW
type ScopeWC t u n f g = (Adjunction t u, Applicative u, Functor f, NatNewtype (ScopeW t n f g) g)
-- | The core internal scope type. (The "w" comes from "wrapper".) We wrap
-- up an UnderScope in some functor and demand that we unwrap it
-- in an adjoint context. In the first case, these functors will be
-- Identity, yielding the Scope newtype. In the second
-- case, these functors will be Located and Colocated,
-- yielding the LocScope newtype.
newtype ScopeW t n f g a
ScopeW :: t (UnderScope n f (g a) a) -> ScopeW t n f g a
[unScopeW] :: ScopeW t n f g a -> t (UnderScope n f (g a) a)
scopeWFree :: ScopeWC t u n f g => a -> u (g a)
scopeWEmbed :: ScopeWC t u n f g => f (g a) -> u (g a)
scopeWFromInnerBinder :: ScopeWC t u n f g => BinderScope n (g a) -> u (g a)
scopeWInnerBinder :: (ScopeWC t u n f g, Eq a) => n -> Seq a -> g a -> BinderScope n (g a)
scopeWInnerBinder1 :: (ScopeWC t u n f g, Eq a) => n -> a -> g a -> BinderScope n (g a)
scopeWAbstract :: (ScopeWC t u n f g, Eq a) => n -> Seq a -> g a -> u (g a)
scopeWAbstract1 :: (ScopeWC t u n f g, Eq a) => n -> a -> g a -> u (g a)
scopeWUnAbstract :: ScopeWC t u n f g => Seq a -> g a -> g a
scopeWUnAbstract1 :: ScopeWC t u n f g => a -> g a -> g a
scopeWInstantiate :: ScopeWC t u n f g => Seq (u (g a)) -> g a -> g a
scopeWInstantiate1 :: ScopeWC t u n f g => u (g a) -> g a -> g a
scopeWApply :: ScopeWC t u n f g => Seq (u (g a)) -> g a -> Either SubError (g a)
scopeWApply1 :: ScopeWC t u n f g => u (g a) -> g a -> Either SubError (g a)
scopeWBind :: ScopeWC t u n f g => (a -> u (g b)) -> g a -> g b
scopeWBindOpt :: ScopeWC t u n f g => (a -> Maybe (u (g a))) -> g a -> g a
scopeWLift :: (ScopeWC t u n f g, Monad u, Traversable f) => f a -> u (g a)
scopeWLiftAnno :: (NatNewtype (ScopeW t n f g) g, Functor t) => t a -> g a
scopeWHoistAnno :: (NatNewtype (ScopeW t n f g) g, NatNewtype (ScopeW w n f h) h, Functor t, Functor w, Functor f) => (forall x. t x -> w x) -> g a -> h a
scopeWMapAnno :: ScopeWC t u n f g => (t a -> t b) -> g a -> g b
instance Control.DeepSeq.NFData (t (Blanks.Under.UnderScope n f (g a) a)) => Control.DeepSeq.NFData (Blanks.ScopeW.ScopeW t n f g a)
instance GHC.Classes.Eq (t (Blanks.Under.UnderScope n f (g a) a)) => GHC.Classes.Eq (Blanks.ScopeW.ScopeW t n f g a)
instance GHC.Show.Show (t (Blanks.Under.UnderScope n f (g a) a)) => GHC.Show.Show (Blanks.ScopeW.ScopeW t n f g a)
instance (GHC.Base.Functor t, GHC.Base.Functor f, GHC.Base.Functor g) => GHC.Base.Functor (Blanks.ScopeW.ScopeW t n f g)
instance (Data.Foldable.Foldable t, Data.Foldable.Foldable f, Data.Foldable.Foldable g) => Data.Foldable.Foldable (Blanks.ScopeW.ScopeW t n f g)
instance (Data.Traversable.Traversable t, Data.Traversable.Traversable f, Data.Traversable.Traversable g) => Data.Traversable.Traversable (Blanks.ScopeW.ScopeW t n f g)
module Blanks.Scope
-- | A simple wrapper for your expression functor that knows how to
-- name-bind. Create free variables is pure, bind them with
-- >>=, and list free variables with folds. See
-- LocScope for a version with additional annotations between
-- layers.
newtype Scope n f a
Scope :: ScopeW Identity n f (Scope n f) a -> Scope n f a
[unScope] :: Scope n f a -> ScopeW Identity n f (Scope n f) a
pattern ScopeBound :: Int -> Scope n f a
pattern ScopeFree :: a -> Scope n f a
pattern ScopeBinder :: Int -> n -> Scope n f a -> Scope n f a
pattern ScopeEmbed :: f (Scope n f a) -> Scope n f a
scopeWFromInnerBinder :: ScopeWC t u n f g => BinderScope n (g a) -> u (g a)
-- | Substitution as a kind of monadic bind.
scopeBind :: Functor f => (a -> Scope n f b) -> Scope n f a -> Scope n f b
-- | Optional substitution as another kind of monadic bind.
scopeBindOpt :: Functor f => (a -> Maybe (Scope n f a)) -> Scope n f a -> Scope n f a
-- | Lift an expression functor into the scope functor.
scopeLift :: Traversable f => f a -> Scope n f a
scopeInnerBinder :: (Functor f, Eq a) => n -> Seq a -> Scope n f a -> BinderScope n (Scope n f a)
scopeInnerBinder1 :: (Functor f, Eq a) => n -> a -> Scope n f a -> BinderScope n (Scope n f a)
-- | Binds free variables in an expression and returns a binder.
scopeAbstract :: (Functor f, Eq a) => n -> Seq a -> Scope n f a -> Scope n f a
-- | scopeAbstract for a single argument.
scopeAbstract1 :: (Functor f, Eq a) => n -> a -> Scope n f a -> Scope n f a
-- | Un-bind free variables in an expression. Basically the inverse of
-- scopeAbstract. Take care to match the arity of the binder!
-- (scopeApply is safer.)
scopeUnAbstract :: Functor f => Seq a -> Scope n f a -> Scope n f a
scopeUnAbstract1 :: Functor f => a -> Scope n f a -> Scope n f a
-- | Instantiate the bound variables in an expression with other
-- expressions. Take care to match the arity of the binder!
-- (scopeApply is safer.)
scopeInstantiate :: Functor f => Seq (Scope n f a) -> Scope n f a -> Scope n f a
-- | scopeInstantiate for a single argument.
scopeInstantiate1 :: Functor f => Scope n f a -> Scope n f a -> Scope n f a
-- | Instantiates the bound variables in an expression with other
-- expressions. Throws errors on mismatched arity, non binder expression,
-- unbound vars, etc. A version of scopeInstantiate that fails
-- loudly instead of silently!
scopeApply :: Functor f => Seq (Scope n f a) -> Scope n f a -> Either SubError (Scope n f a)
-- | scopeApply for a single argument.
scopeApply1 :: Functor f => Scope n f a -> Scope n f a -> Either SubError (Scope n f a)
instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Blanks.Scope.Scope n f)
instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Blanks.Scope.Scope n f)
instance GHC.Base.Functor f => GHC.Base.Functor (Blanks.Scope.Scope n f)
instance Blanks.NatNewtype.NatNewtype (Blanks.ScopeW.ScopeW Data.Functor.Identity.Identity n f (Blanks.Scope.Scope n f)) (Blanks.Scope.Scope n f)
instance (Control.DeepSeq.NFData n, Control.DeepSeq.NFData a, Control.DeepSeq.NFData (f (Blanks.Scope.Scope n f a))) => Control.DeepSeq.NFData (Blanks.Scope.Scope n f a)
instance GHC.Base.Functor f => GHC.Base.Applicative (Blanks.Scope.Scope n f)
instance GHC.Base.Functor f => GHC.Base.Monad (Blanks.Scope.Scope n f)
instance (GHC.Classes.Eq (f (Blanks.Scope.Scope n f a)), GHC.Classes.Eq n, GHC.Classes.Eq a) => GHC.Classes.Eq (Blanks.Scope.Scope n f a)
instance (GHC.Show.Show (f (Blanks.Scope.Scope n f a)), GHC.Show.Show n, GHC.Show.Show a) => GHC.Show.Show (Blanks.Scope.Scope n f a)
module Blanks.LocScope
-- | A Scope annotated with some information between constructors.
newtype LocScope l n f a
LocScope :: ScopeW (Located l) n f (LocScope l n f) a -> LocScope l n f a
[unLocScope] :: LocScope l n f a -> ScopeW (Located l) n f (LocScope l n f) a
pattern LocScopeBound :: l -> Int -> LocScope l n f a
pattern LocScopeFree :: l -> a -> LocScope l n f a
pattern LocScopeBinder :: l -> Int -> n -> LocScope l n f a -> LocScope l n f a
pattern LocScopeEmbed :: l -> f (LocScope l n f a) -> LocScope l n f a
-- | Extract the location (annotation) from this scope.
locScopeLocation :: LocScope l n f a -> l
locScopeFree :: Functor f => a -> Colocated l (LocScope l n f a)
locScopeEmbed :: Functor f => f (LocScope l n f a) -> Colocated l (LocScope l n f a)
locScopeFromInnerBinder :: Functor f => BinderScope n (LocScope l n f a) -> Colocated l (LocScope l n f a)
locScopeBind :: Functor f => (a -> Colocated l (LocScope l n f b)) -> LocScope l n f a -> LocScope l n f b
locScopeBindOpt :: Functor f => (a -> Maybe (Colocated l (LocScope l n f a))) -> LocScope l n f a -> LocScope l n f a
locScopeLift :: Traversable f => f a -> Colocated l (LocScope l n f a)
locScopeInnerBinder :: (Functor f, Eq a) => n -> Seq a -> LocScope l n f a -> BinderScope n (LocScope l n f a)
locScopeInnerBinder1 :: (Functor f, Eq a) => n -> a -> LocScope l n f a -> BinderScope n (LocScope l n f a)
locScopeAbstract :: (Functor f, Eq a) => n -> Seq a -> LocScope l n f a -> Colocated l (LocScope l n f a)
locScopeAbstract1 :: (Functor f, Eq a) => n -> a -> LocScope l n f a -> Colocated l (LocScope l n f a)
locScopeUnAbstract :: Functor f => Seq a -> LocScope l n f a -> LocScope l n f a
locScopeUnAbstract1 :: Functor f => a -> LocScope l n f a -> LocScope l n f a
locScopeInstantiate :: Functor f => Seq (Colocated l (LocScope l n f a)) -> LocScope l n f a -> LocScope l n f a
locScopeInstantiate1 :: Functor f => Colocated l (LocScope l n f a) -> LocScope l n f a -> LocScope l n f a
locScopeApply :: Functor f => Seq (Colocated l (LocScope l n f a)) -> LocScope l n f a -> Either SubError (LocScope l n f a)
locScopeApply1 :: Functor f => Colocated l (LocScope l n f a) -> LocScope l n f a -> Either SubError (LocScope l n f a)
locScopeLiftAnno :: Located l a -> LocScope l n f a
locScopeHoistAnno :: Functor f => (l -> x) -> LocScope l n f a -> LocScope x n f a
locScopeMapAnno :: Functor f => (Located l a -> Located l b) -> LocScope l n f a -> LocScope l n f b
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 Blanks.NatNewtype.NatNewtype (Blanks.ScopeW.ScopeW (Blanks.Located.Located l) n f (Blanks.LocScope.LocScope l n f)) (Blanks.LocScope.LocScope l n f)
instance (Control.DeepSeq.NFData l, Control.DeepSeq.NFData n, Control.DeepSeq.NFData a, Control.DeepSeq.NFData (f (Blanks.LocScope.LocScope l n f a))) => Control.DeepSeq.NFData (Blanks.LocScope.LocScope l n f a)
instance (GHC.Base.Monoid l, GHC.Base.Functor f) => GHC.Base.Applicative (Blanks.LocScope.LocScope l n f)
instance (GHC.Base.Monoid l, GHC.Base.Functor f) => GHC.Base.Monad (Blanks.LocScope.LocScope l n f)
instance (GHC.Base.Monoid l, GHC.Base.Functor f) => Control.Monad.Writer.Class.MonadWriter l (Blanks.LocScope.LocScope l n f)
instance (GHC.Classes.Eq (f (Blanks.LocScope.LocScope 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.LocScope.LocScope 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)
module Blanks.Conversion
-- | Forget all the annotations and yield a plain Scope.
locScopeForget :: Functor f => LocScope l n f a -> Scope n f a
-- | Annotate every location in the Scope with a given value as a
-- LocScope.
scopeAnno :: Functor f => l -> Scope n f a -> LocScope l n f a
-- | Utilities for gathering and caching sets of free variables.
module Blanks.Tracked
data Tracked a
Tracked :: !Set a -> !Set Int -> Tracked a
[trackedFree] :: Tracked a -> !Set a
[trackedBound] :: Tracked a -> !Set Int
mkTrackedFree :: a -> Tracked a
mkTrackedBound :: Int -> Tracked a
shiftTracked :: Int -> Tracked a -> Tracked a
data WithTracked a l
WithTracked :: !Tracked a -> !l -> WithTracked a l
[withTrackedState] :: WithTracked a l -> !Tracked a
[withTrackedEnv] :: WithTracked a l -> !l
forgetTrackedScope :: Functor f => LocScope (WithTracked a l) n f z -> LocScope l n f z
trackScope :: (Traversable f, Ord a) => LocScope l n f a -> LocScope (WithTracked a l) n f a
trackScopeSimple :: (Traversable f, Ord a) => Scope n f a -> LocScope (Tracked a) n f a
instance (Control.DeepSeq.NFData a, Control.DeepSeq.NFData l) => Control.DeepSeq.NFData (Blanks.Tracked.WithTracked a l)
instance Data.Traversable.Traversable (Blanks.Tracked.WithTracked a)
instance Data.Foldable.Foldable (Blanks.Tracked.WithTracked a)
instance GHC.Base.Functor (Blanks.Tracked.WithTracked a)
instance GHC.Generics.Generic (Blanks.Tracked.WithTracked a l)
instance (GHC.Show.Show a, GHC.Show.Show l) => GHC.Show.Show (Blanks.Tracked.WithTracked a l)
instance (GHC.Classes.Eq a, GHC.Classes.Eq l) => GHC.Classes.Eq (Blanks.Tracked.WithTracked a l)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Blanks.Tracked.Tracked a)
instance GHC.Generics.Generic (Blanks.Tracked.Tracked a)
instance GHC.Show.Show a => GHC.Show.Show (Blanks.Tracked.Tracked a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Blanks.Tracked.Tracked a)
instance GHC.Classes.Ord a => GHC.Base.Semigroup (Blanks.Tracked.Tracked a)
instance GHC.Classes.Ord a => GHC.Base.Monoid (Blanks.Tracked.Tracked a)
module Blanks.Split
newtype BinderId
BinderId :: Int -> BinderId
[unBinderId] :: BinderId -> Int
data SplitFunctor f a
SplitFunctorBase :: !f a -> SplitFunctor f a
SplitFunctorClosure :: !BinderId -> !Seq Int -> SplitFunctor f a
data SplitBinder l n f a
SplitBinder :: !Int -> !Set a -> !BinderScope n (LocScope l n (SplitFunctor f) a) -> SplitBinder l n f a
[splitBinderClosureArity] :: SplitBinder l n f a -> !Int
[splitBinderFree] :: SplitBinder l n f a -> !Set a
[splitBinderScope] :: SplitBinder l n f a -> !BinderScope n (LocScope l n (SplitFunctor f) a)
data SplitResult l n f a
SplitResult :: !Tracked a -> !LocScope l n (SplitFunctor f) a -> !Map BinderId (SplitBinder l n f a) -> SplitResult l n f a
[splitResultTracked] :: SplitResult l n f a -> !Tracked a
[splitResultScope] :: SplitResult l n f a -> !LocScope l n (SplitFunctor f) a
[splitResultBinders] :: SplitResult l n f a -> !Map BinderId (SplitBinder l n f a)
splitLocScope :: (Traversable f, Ord a) => LocScope (WithTracked a l) n f a -> SplitResult l n f a
instance GHC.Generics.Generic (Blanks.Split.SplitBinder l n f a)
instance Control.DeepSeq.NFData (f a) => Control.DeepSeq.NFData (Blanks.Split.SplitFunctor f a)
instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Blanks.Split.SplitFunctor f)
instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Blanks.Split.SplitFunctor f)
instance GHC.Base.Functor f => GHC.Base.Functor (Blanks.Split.SplitFunctor f)
instance GHC.Generics.Generic (Blanks.Split.SplitFunctor f a)
instance GHC.Show.Show (f a) => GHC.Show.Show (Blanks.Split.SplitFunctor f a)
instance GHC.Classes.Eq (f a) => GHC.Classes.Eq (Blanks.Split.SplitFunctor f a)
instance GHC.Num.Num Blanks.Split.BinderId
instance Control.DeepSeq.NFData Blanks.Split.BinderId
instance GHC.Enum.Enum Blanks.Split.BinderId
instance GHC.Classes.Ord Blanks.Split.BinderId
instance GHC.Show.Show Blanks.Split.BinderId
instance GHC.Classes.Eq Blanks.Split.BinderId
instance (GHC.Classes.Eq l, GHC.Classes.Eq n, GHC.Classes.Eq a, GHC.Classes.Eq (f (Blanks.LocScope.LocScope l n (Blanks.Split.SplitFunctor f) a))) => GHC.Classes.Eq (Blanks.Split.SplitBinder l n f a)
instance (GHC.Show.Show l, GHC.Show.Show n, GHC.Show.Show a, GHC.Show.Show (f (Blanks.LocScope.LocScope l n (Blanks.Split.SplitFunctor f) a))) => GHC.Show.Show (Blanks.Split.SplitBinder l n f a)
instance (Control.DeepSeq.NFData l, Control.DeepSeq.NFData n, Control.DeepSeq.NFData a, Control.DeepSeq.NFData (f (Blanks.LocScope.LocScope l n (Blanks.Split.SplitFunctor f) a))) => Control.DeepSeq.NFData (Blanks.Split.SplitBinder l n f a)
-- | You'll get most of what you want by just importing this module
-- unqualified. See Scope for the basic wrapper and
-- LocScope for a wrapper with annotations you can use for source
-- locations and the like. See the test suite for examples.
module Blanks
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