Wired up the enabling and disabling of warnings

This commit is contained in:
Neil Brown 2008-11-20 14:17:11 +00:00
parent 6cbdc0e13b
commit 558ceec4c2

View File

@ -43,8 +43,11 @@ instance Die PassM where
dieReport = throwError dieReport = throwError
instance Warn PassM where instance Warn PassM where
warnReport w = lift $ modify $ warnReport w@(_,t,_) = lift $ modify $
\cs -> cs { csWarnings = csWarnings cs ++ [w] } \cs -> cs { csWarnings =
if t `Set.member` csEnabledWarnings cs
then csWarnings cs ++ [w]
else csWarnings cs }
-- | The type of a pass function. -- | The type of a pass function.
-- This is as generic as possible. Passes are used on 'A.AST' in normal use, -- This is as generic as possible. Passes are used on 'A.AST' in normal use,