CoreLint

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

CoreLint

Contents

- Debug output

Synopsis

- lintCoreBindings :: DynFlags -> CoreToDo -> [Var] -> CoreProgram -> (Bag MsgDoc, Bag MsgDoc)
- lintUnfolding :: DynFlags -> SrcLoc -> VarSet -> CoreExpr -> Maybe MsgDoc
- lintPassResult :: HscEnv -> CoreToDo -> CoreProgram -> IO ()
- lintInteractiveExpr :: String -> HscEnv -> CoreExpr -> IO ()
- lintExpr :: DynFlags -> [Var] -> CoreExpr -> Maybe MsgDoc
- lintAnnots :: SDoc -> (ModGuts -> CoreM ModGuts) -> ModGuts -> CoreM ModGuts
- lintTypes :: DynFlags -> [TyCoVar] -> [Type] -> Maybe MsgDoc
- 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 :: DynFlags -> CoreToDo -> [Var] -> CoreProgram -> (Bag MsgDoc, Bag MsgDoc) #

lintUnfolding :: DynFlags -> SrcLoc -> VarSet -> CoreExpr -> Maybe MsgDoc #

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

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

lintExpr :: DynFlags -> [Var] -> CoreExpr -> Maybe MsgDoc #

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

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.

lintTypes :: DynFlags -> [TyCoVar] -> [Type] -> Maybe MsgDoc #

## Debug output

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 () #