CoreLint

ghc-7.10.2: The GHC API

Safe Haskell | None
Language | Haskell2010

CoreLint

Contents

- Debug output

Synopsis

- lintCoreBindings :: CoreToDo -> [Var] -> CoreProgram -> (Bag MsgDoc, Bag MsgDoc)
- lintUnfolding :: SrcLoc -> [Var] -> CoreExpr -> Maybe MsgDoc
- lintPassResult :: HscEnv -> CoreToDo -> CoreProgram -> IO ()
- lintInteractiveExpr :: String -> HscEnv -> CoreExpr -> IO ()
- lintExpr :: [Var] -> CoreExpr -> Maybe MsgDoc
- lintAnnots :: SDoc -> (ModGuts -> CoreM ModGuts) -> ModGuts -> CoreM ModGuts
- showPass :: CoreToDo -> CoreM ()
- showPassIO :: DynFlags -> CoreToDo -> IO ()
- endPass :: CoreToDo -> CoreProgram -> [CoreRule] -> CoreM ()
- endPassIO :: HscEnv -> PrintUnqualified -> CoreToDo -> CoreProgram -> [CoreRule] -> IO ()
- dumpPassResult :: DynFlags -> PrintUnqualified -> Maybe DumpFlag -> SDoc -> SDoc -> CoreProgram -> [CoreRule] -> IO ()
- dumpIfSet :: DynFlags -> Bool -> CoreToDo -> SDoc -> SDoc -> IO ()

# Documentation

lintCoreBindings :: CoreToDo -> [Var] -> CoreProgram -> (Bag MsgDoc, Bag MsgDoc) Source

lintUnfolding :: SrcLoc -> [Var] -> CoreExpr -> Maybe MsgDoc Source

lintPassResult :: HscEnv -> CoreToDo -> CoreProgram -> IO () Source

lintInteractiveExpr :: String -> HscEnv -> CoreExpr -> IO () Source

lintExpr :: [Var] -> CoreExpr -> Maybe MsgDoc Source

lintAnnots :: SDoc -> (ModGuts -> CoreM ModGuts) -> ModGuts -> CoreM ModGuts Source

This checks whether a pass correctly looks through debug annotations (`SourceNote`). This works a bit different from other consistency checks: We check this by running the given task twice, noting all differences between the results.

## Debug output

showPass :: CoreToDo -> CoreM () Source

showPassIO :: DynFlags -> CoreToDo -> IO () Source

endPass :: CoreToDo -> CoreProgram -> [CoreRule] -> CoreM () Source

endPassIO :: HscEnv -> PrintUnqualified -> CoreToDo -> CoreProgram -> [CoreRule] -> IO () Source

dumpPassResult :: DynFlags -> PrintUnqualified -> Maybe DumpFlag -> SDoc -> SDoc -> CoreProgram -> [CoreRule] -> IO () Source

dumpIfSet :: DynFlags -> Bool -> CoreToDo -> SDoc -> SDoc -> IO () Source