syntax-tree-0.1.0.1: Typed ASTs

Safe HaskellNone
LanguageHaskell2010

AST.Infer.ScopeLevel

Synopsis

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.

Constructors

ScopeLevel Int 
Instances
Eq ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Ord ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Show ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Generic ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Associated Types

type Rep ScopeLevel :: Type -> Type #

Semigroup ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Monoid ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Binary ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

NFData ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Methods

rnf :: ScopeLevel -> () #

PartialOrd ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

Pretty ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

TypeConstraints ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

type Rep ScopeLevel Source # 
Instance details

Defined in AST.Infer.ScopeLevel

type Rep ScopeLevel = D1 (MetaData "ScopeLevel" "AST.Infer.ScopeLevel" "syntax-tree-0.1.0.1-5Y9WhklreXaDnL6Q9tTtln" True) (C1 (MetaCons "ScopeLevel" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

class Monad m => MonadScopeLevel m where Source #

A class of Monads which maintain a scope level, where the level can be locally increased for computations.

Methods

localLevel :: m a -> m a Source #