Wired up the enabling and disabling of warnings
This commit is contained in:
parent
6cbdc0e13b
commit
558ceec4c2
|
@ -43,8 +43,11 @@ instance Die PassM where
|
|||
dieReport = throwError
|
||||
|
||||
instance Warn PassM where
|
||||
warnReport w = lift $ modify $
|
||||
\cs -> cs { csWarnings = csWarnings cs ++ [w] }
|
||||
warnReport w@(_,t,_) = lift $ modify $
|
||||
\cs -> cs { csWarnings =
|
||||
if t `Set.member` csEnabledWarnings cs
|
||||
then csWarnings cs ++ [w]
|
||||
else csWarnings cs }
|
||||
|
||||
-- | The type of a pass function.
|
||||
-- This is as generic as possible. Passes are used on 'A.AST' in normal use,
|
||||
|
|
Loading…
Reference in New Issue
Block a user