hypertypes-0.1.0.2: Typed ASTs
Safe HaskellNone
LanguageHaskell2010

Hyper.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

Instances details
Eq ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Ord ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Show ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Generic ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Associated Types

type Rep ScopeLevel :: Type -> Type #

Semigroup ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Monoid ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Binary ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

NFData ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Methods

rnf :: ScopeLevel -> () #

PartialOrd ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Pretty ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

TypeConstraints ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

type Rep ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

type Rep ScopeLevel = D1 ('MetaData "ScopeLevel" "Hyper.Infer.ScopeLevel" "hypertypes-0.1.0.2-GDiSRF0EwgQ6Mkx3yytlTL" '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 #