<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >CoreMonad</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_CoreMonad.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >ghc-6.12.3: The GHC API</TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >CoreMonad</FONT ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" ><B >Contents</B ></TD ></TR ><TR ><TD ><DL ><DT ><A HREF="#1" >The monad </A ></DT ><DD ><DL ><DT ><A HREF="#2" >Reading from the monad </A ></DT ><DT ><A HREF="#3" >Writing to the monad </A ></DT ><DT ><A HREF="#4" >Lifting into the monad </A ></DT ><DT ><A HREF="#5" >Dealing with annotations </A ></DT ><DT ><A HREF="#6" >Screen output </A ></DT ></DL ></DD ><DT ><A HREF="#7" >Getting <TT ><A HREF="Name.html#t%3AName" >Name</A ></TT >s </A ></DT ></DL ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3ACoreM" >CoreM</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3ArunCoreM" >runCoreM</A > :: <A HREF="HscTypes.html#t%3AHscEnv" >HscEnv</A > -> <A HREF="Annotations.html#t%3AAnnEnv" >AnnEnv</A > -> <A HREF="Rules.html#t%3ARuleBase" >RuleBase</A > -> <A HREF="UniqSupply.html#t%3AUniqSupply" >UniqSupply</A > -> <A HREF="Module.html#t%3AModule" >Module</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > a -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > (a, <A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A >)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetHscEnv" >getHscEnv</A > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="HscTypes.html#t%3AHscEnv" >HscEnv</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetAnnEnv" >getAnnEnv</A > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="Annotations.html#t%3AAnnEnv" >AnnEnv</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetRuleBase" >getRuleBase</A > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="Rules.html#t%3ARuleBase" >RuleBase</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetModule" >getModule</A > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="Module.html#t%3AModule" >Module</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetDynFlags" >getDynFlags</A > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="DynFlags.html#t%3ADynFlags" >DynFlags</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetOrigNameCache" >getOrigNameCache</A > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="HscTypes.html#t%3AOrigNameCache" >OrigNameCache</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AaddSimplCount" >addSimplCount</A > :: <A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AliftIO" >liftIO</A > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > a -> m a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AliftIOWithCount" >liftIOWithCount</A > :: <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > (<A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A >, a) -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AliftIO1" >liftIO1</A > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > b) -> a -> m b</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AliftIO2" >liftIO2</A > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> b -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > c) -> a -> b -> m c</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AliftIO3" >liftIO3</A > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> b -> c -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > d) -> a -> b -> c -> m d</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AliftIO4" >liftIO4</A > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> b -> c -> d -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > e) -> a -> b -> c -> d -> m e</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfindAnnotations" >findAnnotations</A > :: <A HREF="../base-4.2.0.2/Data-Typeable.html#t%3ATypeable" >Typeable</A > a => ([<A HREF="../base-4.2.0.2/Data-Word.html#t%3AWord8" >Word8</A >] -> a) -> <A HREF="Annotations.html#t%3ACoreAnnTarget" >CoreAnnTarget</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > [a]</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AaddAnnotation" >addAnnotation</A > :: <A HREF="../base-4.2.0.2/Data-Typeable.html#t%3ATypeable" >Typeable</A > a => (a -> [<A HREF="../base-4.2.0.2/Data-Word.html#t%3AWord8" >Word8</A >]) -> <A HREF="Annotations.html#t%3ACoreAnnTarget" >CoreAnnTarget</A > -> a -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AputMsg" >putMsg</A > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AputMsgS" >putMsgS</A > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AerrorMsg" >errorMsg</A > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AerrorMsgS" >errorMsgS</A > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfatalErrorMsg" >fatalErrorMsg</A > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfatalErrorMsgS" >fatalErrorMsgS</A > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AdebugTraceMsg" >debugTraceMsg</A > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AdebugTraceMsgS" >debugTraceMsgS</A > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AdumpIfSet_dyn" >dumpIfSet_dyn</A > :: <A HREF="DynFlags.html#t%3ADynFlag" >DynFlag</A > -> <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AthNameToGhcName" >thNameToGhcName</A > :: <A HREF="../template-haskell-2.4.0.1/Language-Haskell-TH-Syntax.html#t%3AName" >Name</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > (<A HREF="../base-4.2.0.2/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="Name.html#t%3AName" >Name</A >)</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="1" ><A NAME="1" >The monad </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CoreM" ><A NAME="t%3ACoreM" ></A ></A ><B >CoreM</B > a </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >The monad used by Core-to-Core passes to access common state, register simplification statistics and so on </TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:CoreM')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:CoreM" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonad" >Monad</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="../base-4.2.0.2/Control-Monad.html#t%3AFunctor" >Functor</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonadPlus" >MonadPlus</A > <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > => <A HREF="../base-4.2.0.2/Control-Monad.html#t%3AMonadPlus" >MonadPlus</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="MonadUtils.html#t%3AApplicative" >Applicative</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="UniqSupply.html#t%3AMonadUnique" >MonadUnique</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="HscTypes.html#t%3AMonadThings" >MonadThings</A > <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:runCoreM" ><A NAME="v%3ArunCoreM" ></A ></A ><B >runCoreM</B > :: <A HREF="HscTypes.html#t%3AHscEnv" >HscEnv</A > -> <A HREF="Annotations.html#t%3AAnnEnv" >AnnEnv</A > -> <A HREF="Rules.html#t%3ARuleBase" >RuleBase</A > -> <A HREF="UniqSupply.html#t%3AUniqSupply" >UniqSupply</A > -> <A HREF="Module.html#t%3AModule" >Module</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > a -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > (a, <A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A >)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="2" ><A NAME="2" >Reading from the monad </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getHscEnv" ><A NAME="v%3AgetHscEnv" ></A ></A ><B >getHscEnv</B > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="HscTypes.html#t%3AHscEnv" >HscEnv</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getAnnEnv" ><A NAME="v%3AgetAnnEnv" ></A ></A ><B >getAnnEnv</B > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="Annotations.html#t%3AAnnEnv" >AnnEnv</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getRuleBase" ><A NAME="v%3AgetRuleBase" ></A ></A ><B >getRuleBase</B > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="Rules.html#t%3ARuleBase" >RuleBase</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getModule" ><A NAME="v%3AgetModule" ></A ></A ><B >getModule</B > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="Module.html#t%3AModule" >Module</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getDynFlags" ><A NAME="v%3AgetDynFlags" ></A ></A ><B >getDynFlags</B > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="DynFlags.html#t%3ADynFlags" >DynFlags</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getOrigNameCache" ><A NAME="v%3AgetOrigNameCache" ></A ></A ><B >getOrigNameCache</B > :: <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="HscTypes.html#t%3AOrigNameCache" >OrigNameCache</A ></TD ></TR ><TR ><TD CLASS="doc" >The original name cache is the current mapping from <TT ><A HREF="Module.html#t%3AModule" >Module</A ></TT > and OccName to a compiler-wide unique <TT ><A HREF="Name.html#t%3AName" >Name</A ></TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="3" ><A NAME="3" >Writing to the monad </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:addSimplCount" ><A NAME="v%3AaddSimplCount" ></A ></A ><B >addSimplCount</B > :: <A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="4" ><A NAME="4" >Lifting into the monad </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:liftIO" ><A NAME="v%3AliftIO" ></A ></A ><B >liftIO</B > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > a -> m a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:liftIOWithCount" ><A NAME="v%3AliftIOWithCount" ></A ></A ><B >liftIOWithCount</B > :: <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > (<A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A >, a) -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > a</TD ></TR ><TR ><TD CLASS="doc" >Lift an <TT ><A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A ></TT > operation into <TT ><A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A ></TT > while consuming its <TT ><A HREF="SimplMonad.html#t%3ASimplCount" >SimplCount</A ></TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:liftIO1" ><A NAME="v%3AliftIO1" ></A ></A ><B >liftIO1</B > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > b) -> a -> m b</TD ></TR ><TR ><TD CLASS="doc" >Lift an <TT ><A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A ></TT > operation with 1 argument into another monad </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:liftIO2" ><A NAME="v%3AliftIO2" ></A ></A ><B >liftIO2</B > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> b -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > c) -> a -> b -> m c</TD ></TR ><TR ><TD CLASS="doc" >Lift an <TT ><A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A ></TT > operation with 2 arguments into another monad </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:liftIO3" ><A NAME="v%3AliftIO3" ></A ></A ><B >liftIO3</B > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> b -> c -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > d) -> a -> b -> c -> m d</TD ></TR ><TR ><TD CLASS="doc" >Lift an <TT ><A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A ></TT > operation with 3 arguments into another monad </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:liftIO4" ><A NAME="v%3AliftIO4" ></A ></A ><B >liftIO4</B > :: <A HREF="MonadUtils.html#t%3AMonadIO" >MonadIO</A > m => (a -> b -> c -> d -> <A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A > e) -> a -> b -> c -> d -> m e</TD ></TR ><TR ><TD CLASS="doc" >Lift an <TT ><A HREF="../base-4.2.0.2/System-IO.html#t%3AIO" >IO</A ></TT > operation with 4 arguments into another monad </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="5" ><A NAME="5" >Dealing with annotations </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:findAnnotations" ><A NAME="v%3AfindAnnotations" ></A ></A ><B >findAnnotations</B > :: <A HREF="../base-4.2.0.2/Data-Typeable.html#t%3ATypeable" >Typeable</A > a => ([<A HREF="../base-4.2.0.2/Data-Word.html#t%3AWord8" >Word8</A >] -> a) -> <A HREF="Annotations.html#t%3ACoreAnnTarget" >CoreAnnTarget</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > [a]</TD ></TR ><TR ><TD CLASS="doc" ><P >Find all the annotations we currently know about for the given target. Note that no annotations will be returned if we haven't loaded information about the particular target you are inquiring about: by default, only those modules that have been imported by the program being compiled will have been loaded in this way. </P ><P >To load the information from additional modules, you can use the functions DynamicLoading.forceLoadModuleInterfaces and DynamicLoading.forceLoadNameModuleInterface, but be aware that doing this indiscriminantly will impose a performance penalty. </P ><P >If no deserialization function is supplied, only transient annotations will be returned. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:addAnnotation" ><A NAME="v%3AaddAnnotation" ></A ></A ><B >addAnnotation</B > :: <A HREF="../base-4.2.0.2/Data-Typeable.html#t%3ATypeable" >Typeable</A > a => (a -> [<A HREF="../base-4.2.0.2/Data-Word.html#t%3AWord8" >Word8</A >]) -> <A HREF="Annotations.html#t%3ACoreAnnTarget" >CoreAnnTarget</A > -> a -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="6" ><A NAME="6" >Screen output </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:putMsg" ><A NAME="v%3AputMsg" ></A ></A ><B >putMsg</B > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output a message to the screen </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:putMsgS" ><A NAME="v%3AputMsgS" ></A ></A ><B >putMsgS</B > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output a String message to the screen </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:errorMsg" ><A NAME="v%3AerrorMsg" ></A ></A ><B >errorMsg</B > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output an error to the screen </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:errorMsgS" ><A NAME="v%3AerrorMsgS" ></A ></A ><B >errorMsgS</B > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output a string error to the screen </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fatalErrorMsg" ><A NAME="v%3AfatalErrorMsg" ></A ></A ><B >fatalErrorMsg</B > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output a fatal error to the screen. Note this does not by itself cause the compiler to die </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fatalErrorMsgS" ><A NAME="v%3AfatalErrorMsgS" ></A ></A ><B >fatalErrorMsgS</B > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output a fatal string error to the screen. Note this does not by itself cause the compiler to die </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:debugTraceMsg" ><A NAME="v%3AdebugTraceMsg" ></A ></A ><B >debugTraceMsg</B > :: <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Outputs a debugging message at verbosity level of <TT >-v</TT > or higher </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:debugTraceMsgS" ><A NAME="v%3AdebugTraceMsgS" ></A ></A ><B >debugTraceMsgS</B > :: <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Output a string debugging message at verbosity level of <TT >-v</TT > or higher </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:dumpIfSet_dyn" ><A NAME="v%3AdumpIfSet_dyn" ></A ></A ><B >dumpIfSet_dyn</B > :: <A HREF="DynFlags.html#t%3ADynFlag" >DynFlag</A > -> <A HREF="../base-4.2.0.2/Data-Char.html#t%3AString" >String</A > -> <A HREF="Outputable.html#t%3ASDoc" >SDoc</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > <A HREF="../ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" >Show some labelled <TT ><A HREF="Outputable.html#t%3ASDoc" >SDoc</A ></TT > if a particular flag is set or at a verbosity level of <TT >-v -ddump-most</TT > or higher </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="7" ><A NAME="7" >Getting <TT ><A HREF="Name.html#t%3AName" >Name</A ></TT >s </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:thNameToGhcName" ><A NAME="v%3AthNameToGhcName" ></A ></A ><B >thNameToGhcName</B > :: <A HREF="../template-haskell-2.4.0.1/Language-Haskell-TH-Syntax.html#t%3AName" >Name</A > -> <A HREF="CoreMonad.html#t%3ACoreM" >CoreM</A > (<A HREF="../base-4.2.0.2/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="Name.html#t%3AName" >Name</A >)</TD ></TR ><TR ><TD CLASS="doc" >Attempt to convert a Template Haskell name to one that GHC can understand. Original TH names such as those you get when you use the <TT >'foo</TT > syntax will be translated to their equivalent GHC name exactly. Qualified or unqualifed TH names will be dynamically bound to names in the module being compiled, if possible. Exact TH names will be bound to the name they represent, exactly. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.1</TD ></TR ></TABLE ></BODY ></HTML >