giml-language-0.1.0.0: A purely functional programming language with emphasis on structural typing
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Giml.Rewrites.PostInfer.Shadowing

Description

Warn about variable shadowing

Synopsis

Documentation

data Env b Source #

Constructors

Env 

Instances

Instances details
Generic (Env b) Source # 
Instance details

Defined in Language.Giml.Rewrites.PostInfer.Shadowing

Associated Types

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

Methods

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

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

type Rep (Env b) Source # 
Instance details

Defined in Language.Giml.Rewrites.PostInfer.Shadowing

type Rep (Env b) = D1 ('MetaData "Env" "Language.Giml.Rewrites.PostInfer.Shadowing" "giml-language-0.1.0.0-D00xD3NNyCIERJGkwuGtlB" 'False) (C1 ('MetaCons "Env" 'PrefixI 'True) (S1 ('MetaSel ('Just "logAction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LogAction b LogMsg)) :*: S1 ('MetaSel ('Just "varEnv") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Var Ann))))

check :: MonadBase b b => LogAction b LogMsg -> File Ann -> b (File Ann) Source #

Check for variable shadowing in a File.

checkExpr :: HasLog' LogMsg (Env b) b m => Ann -> Expr Ann -> m () Source #

checkBlock :: HasLog' LogMsg (Env b) b m => Block Ann -> m () Source #

checkPattern :: HasLog' LogMsg (Env b) b m => Ann -> Pattern -> Expr Ann -> m () Source #

withVars :: HasLog' LogMsg (Env b) b m => Map Var Ann -> m () -> m () Source #

warnShadowing :: HasLog' LogMsg (Env b) b m => Var -> (Ann, Ann) -> m () Source #