Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type MonadPretty v m = (Var v, MonadReader (Env v) m)
- data Env v = Env {
- boundTerms :: !(Set v)
- boundTypes :: !(Set v)
- freeTerms :: !(Set v)
- ppe :: !PrettyPrintEnv
- runPretty :: Var v => PrettyPrintEnv -> Reader (Env v) a -> a
- addTypeVars :: MonadPretty v m => [v] -> m a -> m a
- willCaptureType :: MonadPretty v m => [v] -> m Bool
- withBoundTerm :: MonadPretty v m => v -> m a -> m a
- withBoundTerms :: MonadPretty v m => [v] -> m a -> m a
Documentation
type MonadPretty v m = (Var v, MonadReader (Env v) m) Source #
Env | |
|
Instances
Generic (Env v) Source # | |
type Rep (Env v) Source # | |
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)))) |
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 #