unison-parser-typechecker-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.PrettyPrintEnv.MonadPretty

Synopsis

Documentation

type MonadPretty v m = (Var v, MonadReader (Env v) m) Source #

data Env v Source #

Constructors

Env 

Fields

Instances

Instances details
Generic (Env v) Source # 
Instance details

Defined in Unison.PrettyPrintEnv.MonadPretty

Associated Types

type Rep (Env v) :: Type -> Type #

Methods

from :: Env v -> Rep (Env v) x #

to :: Rep (Env v) x -> Env v #

type Rep (Env v) Source # 
Instance details

Defined in Unison.PrettyPrintEnv.MonadPretty

type Rep (Env v) = D1 ('MetaData "Env" "Unison.PrettyPrintEnv.MonadPretty" "unison-parser-typechecker-0.0.0-JliU30UQmMa2dDW5SxUdL" 'False) (C1 ('MetaCons "Env" 'PrefixI 'True) ((S1 ('MetaSel ('Just "boundTerms") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set v)) :*: S1 ('MetaSel ('Just "boundTypes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set v))) :*: (S1 ('MetaSel ('Just "freeTerms") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set v)) :*: S1 ('MetaSel ('Just "ppe") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PrettyPrintEnv))))

runPretty :: Var v => PrettyPrintEnv -> Reader (Env v) a -> a Source #

addTypeVars :: MonadPretty v m => [v] -> m a -> m a Source #

Add type variables to the set of variables that need to be avoided

willCaptureType :: MonadPretty v m => [v] -> m Bool Source #

Check if a list of type variables contains any variables that need to be avoided

withBoundTerm :: MonadPretty v m => v -> m a -> m a Source #

withBoundTerms :: MonadPretty v m => [v] -> m a -> m a Source #