hypertypes-0.2.2: Typed ASTs
Safe HaskellSafe-Inferred
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
Monoid ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Semigroup 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 #

Show 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 -> () #

Eq ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Ord ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

TypeConstraints ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

PartialOrd ScopeLevel Source # 
Instance details

Defined in Hyper.Infer.ScopeLevel

Pretty 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.2.2-9g9pX7Hb2mGI4yyssTDpOd" '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 #