Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ScopeLevel = ScopeLevel Int
- _ScopeLevel :: Iso' ScopeLevel Int
- class Monad m => MonadScopeLevel m where
- localLevel :: m a -> m a
Documentation
newtype ScopeLevel Source #
A representation of scope nesting level, for use in let-generalization and skolem escape detection.
See "Efficient generalization with levels" for a detailed explanation.
Commonly used as the TypeConstraintsOf
of terms.
Note: The Ord
instance is only for use as a Map
key, not a
logical ordering, for which PartialOrd
is used.
Instances
class Monad m => MonadScopeLevel m where Source #
A class of Monad
s which maintain a scope level,
where the level can be locally increased for computations.
localLevel :: m a -> m a Source #