<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GHC</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_GHC.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ghc-7.4.2: The GHC API</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">GHC</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Initialisation </a></li><li><a href="#g:2">GHC Monad </a></li><li><a href="#g:3">Flags and settings </a></li><li><a href="#g:4">Targets </a></li><li><a href="#g:5">Loading/compiling the program </a><ul><li><a href="#g:6">Compiling to Core </a></li></ul></li><li><a href="#g:7">Inspecting the module structure of the program </a></li><li><a href="#g:8">Inspecting modules </a></li><li><a href="#g:9">Querying the environment </a></li><li><a href="#g:10">Printing </a></li><li><a href="#g:11">Interactive evaluation </a></li><li><a href="#g:12">Abstract syntax elements </a><ul><li><a href="#g:13">Packages </a></li><li><a href="#g:14">Modules </a></li><li><a href="#g:15">Names </a></li><li><a href="#g:16">Identifiers </a></li><li><a href="#g:17">Type constructors </a></li><li><a href="#g:18">Type variables </a></li><li><a href="#g:19">Data constructors </a></li><li><a href="#g:20">Classes </a></li><li><a href="#g:21">Instances </a></li><li><a href="#g:22">Types and Kinds </a></li><li><a href="#g:23">Entities </a></li><li><a href="#g:24">Syntax </a></li><li><a href="#g:25">Fixities </a></li><li><a href="#g:26">Source locations </a></li><li><a href="#g:27">Located </a><ul><li><a href="#g:28">Constructing Located </a></li><li><a href="#g:29">Deconstructing Located </a></li><li><a href="#g:30">Combining and comparing Located values </a></li></ul></li></ul></li><li><a href="#g:31">Exceptions </a></li><li><a href="#g:32">Token stream manipulations </a></li><li><a href="#g:33">Pure interface to the parser </a></li><li><a href="#g:34">Miscellaneous </a></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:defaultErrorHandler">defaultErrorHandler</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="DynFlags.html#t:LogAction">LogAction</a> -> m a -> m a</li><li class="src short"><a href="#v:defaultCleanupHandler">defaultCleanupHandler</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="GHC.html#t:DynFlags">DynFlags</a> -> m a -> m a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Ghc">Ghc</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:GhcT">GhcT</a> m a</li><li class="src short"><span class="keyword">class</span> (<a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m, <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m) => <a href="#t:GhcMonad">GhcMonad</a> m <span class="keyword">where</span><ul class="subs"><li><a href="#v:getSession">getSession</a> :: m <a href="GHC.html#t:HscEnv">HscEnv</a></li><li><a href="#v:setSession">setSession</a> :: <a href="GHC.html#t:HscEnv">HscEnv</a> -> m ()</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:HscEnv">HscEnv</a> </li><li class="src short"><a href="#v:runGhc">runGhc</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="GHC.html#t:Ghc">Ghc</a> a -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:runGhcT">runGhcT</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="GHC.html#t:GhcT">GhcT</a> m a -> m a</li><li class="src short"><a href="#v:initGhcMonad">initGhcMonad</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> m ()</li><li class="src short"><a href="#v:gcatch">gcatch</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="Panic.html#t:Exception">Exception</a> e) => m a -> (e -> m a) -> m a</li><li class="src short"><a href="#v:gbracket">gbracket</a> :: <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m => m a -> (a -> m b) -> (a -> m c) -> m c</li><li class="src short"><a href="#v:gfinally">gfinally</a> :: <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m => m a -> m b -> m a</li><li class="src short"><a href="#v:printException">printException</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="HscTypes.html#t:SourceError">SourceError</a> -> m ()</li><li class="src short"><a href="#v:printExceptionAndWarnings">printExceptionAndWarnings</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="HscTypes.html#t:SourceError">SourceError</a> -> m ()</li><li class="src short"><a href="#v:handleSourceError">handleSourceError</a> :: <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m => (<a href="HscTypes.html#t:SourceError">SourceError</a> -> m a) -> m a -> m a</li><li class="src short"><a href="#v:needsTemplateHaskell">needsTemplateHaskell</a> :: <a href="GHC.html#t:ModuleGraph">ModuleGraph</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:DynFlags">DynFlags</a> = <a href="#v:DynFlags">DynFlags</a> {<ul class="subs"><li><a href="#v:ghcMode">ghcMode</a> :: <a href="GHC.html#t:GhcMode">GhcMode</a></li><li><a href="#v:ghcLink">ghcLink</a> :: <a href="GHC.html#t:GhcLink">GhcLink</a></li><li><a href="#v:hscTarget">hscTarget</a> :: <a href="GHC.html#t:HscTarget">HscTarget</a></li><li><a href="#v:settings">settings</a> :: <a href="DynFlags.html#t:Settings">Settings</a></li><li><a href="#v:hscOutName">hscOutName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:extCoreName">extCoreName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:verbosity">verbosity</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:optLevel">optLevel</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:simplPhases">simplPhases</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:maxSimplIterations">maxSimplIterations</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:shouldDumpSimplPhase">shouldDumpSimplPhase</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:ruleCheck">ruleCheck</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:strictnessBefore">strictnessBefore</a> :: [<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>]</li><li><a href="#v:simplTickFactor">simplTickFactor</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:specConstrThreshold">specConstrThreshold</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:specConstrCount">specConstrCount</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:liberateCaseThreshold">liberateCaseThreshold</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:floatLamArgs">floatLamArgs</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:cmdlineHcIncludes">cmdlineHcIncludes</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:importPaths">importPaths</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li><a href="#v:mainModIs">mainModIs</a> :: <a href="GHC.html#t:Module">Module</a></li><li><a href="#v:mainFunIs">mainFunIs</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:ctxtStkDepth">ctxtStkDepth</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:thisPackage">thisPackage</a> :: <a href="GHC.html#t:PackageId">PackageId</a></li><li><a href="#v:ways">ways</a> :: [<a href="StaticFlags.html#t:Way">Way</a>]</li><li><a href="#v:buildTag">buildTag</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:rtsBuildTag">rtsBuildTag</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:splitInfo">splitInfo</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</li><li><a href="#v:objectDir">objectDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:dylibInstallName">dylibInstallName</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:hiDir">hiDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:stubDir">stubDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:dumpDir">dumpDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:objectSuf">objectSuf</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:hcSuf">hcSuf</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:hiSuf">hiSuf</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:outputFile">outputFile</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:outputHi">outputHi</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:dynLibLoader">dynLibLoader</a> :: <a href="DynFlags.html#t:DynLibLoader">DynLibLoader</a></li><li><a href="#v:dumpPrefix">dumpPrefix</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:dumpPrefixForce">dumpPrefixForce</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:includePaths">includePaths</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:libraryPaths">libraryPaths</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:frameworkPaths">frameworkPaths</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:cmdlineFrameworks">cmdlineFrameworks</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:rtsOpts">rtsOpts</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:rtsOptsEnabled">rtsOptsEnabled</a> :: <a href="DynFlags.html#t:RtsOptsEnabled">RtsOptsEnabled</a></li><li><a href="#v:hpcDir">hpcDir</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:pluginModNames">pluginModNames</a> :: [<a href="GHC.html#t:ModuleName">ModuleName</a>]</li><li><a href="#v:pluginModNameOpts">pluginModNameOpts</a> :: [(<a href="GHC.html#t:ModuleName">ModuleName</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)]</li><li><a href="#v:depMakefile">depMakefile</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:depIncludePkgDeps">depIncludePkgDeps</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:depExcludeMods">depExcludeMods</a> :: [<a href="GHC.html#t:ModuleName">ModuleName</a>]</li><li><a href="#v:depSuffixes">depSuffixes</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:extraPkgConfs">extraPkgConfs</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li><a href="#v:packageFlags">packageFlags</a> :: [<a href="DynFlags.html#t:PackageFlag">PackageFlag</a>]</li><li><a href="#v:pkgDatabase">pkgDatabase</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="PackageConfig.html#t:PackageConfig">PackageConfig</a>]</li><li><a href="#v:pkgState">pkgState</a> :: <a href="Packages.html#t:PackageState">PackageState</a></li><li><a href="#v:filesToClean">filesToClean</a> :: <a href="IOEnv.html#t:IORef">IORef</a> [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li><a href="#v:dirsToClean">dirsToClean</a> :: <a href="IOEnv.html#t:IORef">IORef</a> (<a href="../containers-0.4.2.1/Data-Map.html#t:Map">Map</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>)</li><li><a href="#v:generatedDumps">generatedDumps</a> :: <a href="IOEnv.html#t:IORef">IORef</a> (<a href="../containers-0.4.2.1/Data-Set.html#t:Set">Set</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>)</li><li><a href="#v:flags">flags</a> :: <a href="../containers-0.4.2.1/Data-IntSet.html#t:IntSet">IntSet</a></li><li><a href="#v:warningFlags">warningFlags</a> :: <a href="../containers-0.4.2.1/Data-IntSet.html#t:IntSet">IntSet</a></li><li><a href="#v:language">language</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> Language</li><li><a href="#v:safeHaskell">safeHaskell</a> :: <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></li><li><a href="#v:thOnLoc">thOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li><a href="#v:newDerivOnLoc">newDerivOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li><a href="#v:pkgTrustOnLoc">pkgTrustOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li><a href="#v:warnSafeOnLoc">warnSafeOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li><a href="#v:warnUnsafeOnLoc">warnUnsafeOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li><a href="#v:extensions">extensions</a> :: [OnOff <a href="DynFlags.html#t:ExtensionFlag">ExtensionFlag</a>]</li><li><a href="#v:extensionFlags">extensionFlags</a> :: <a href="../containers-0.4.2.1/Data-IntSet.html#t:IntSet">IntSet</a></li><li><a href="#v:log_action">log_action</a> :: <a href="DynFlags.html#t:LogAction">LogAction</a></li><li><a href="#v:haddockOptions">haddockOptions</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:profAuto">profAuto</a> :: <a href="DynFlags.html#t:ProfAuto">ProfAuto</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:DynFlag">DynFlag</a> <ul class="subs"><li>= <a href="#v:Opt_D_dump_cmm">Opt_D_dump_cmm</a> </li><li>| <a href="#v:Opt_D_dump_raw_cmm">Opt_D_dump_raw_cmm</a> </li><li>| <a href="#v:Opt_D_dump_cmmz">Opt_D_dump_cmmz</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_pretty">Opt_D_dump_cmmz_pretty</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_cbe">Opt_D_dump_cmmz_cbe</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_proc">Opt_D_dump_cmmz_proc</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_spills">Opt_D_dump_cmmz_spills</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_rewrite">Opt_D_dump_cmmz_rewrite</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_dead">Opt_D_dump_cmmz_dead</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_stub">Opt_D_dump_cmmz_stub</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_sp">Opt_D_dump_cmmz_sp</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_procmap">Opt_D_dump_cmmz_procmap</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_split">Opt_D_dump_cmmz_split</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_lower">Opt_D_dump_cmmz_lower</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_info">Opt_D_dump_cmmz_info</a> </li><li>| <a href="#v:Opt_D_dump_cmmz_cafs">Opt_D_dump_cmmz_cafs</a> </li><li>| <a href="#v:Opt_D_dump_cps_cmm">Opt_D_dump_cps_cmm</a> </li><li>| <a href="#v:Opt_D_dump_cvt_cmm">Opt_D_dump_cvt_cmm</a> </li><li>| <a href="#v:Opt_D_dump_asm">Opt_D_dump_asm</a> </li><li>| <a href="#v:Opt_D_dump_asm_native">Opt_D_dump_asm_native</a> </li><li>| <a href="#v:Opt_D_dump_asm_liveness">Opt_D_dump_asm_liveness</a> </li><li>| <a href="#v:Opt_D_dump_asm_coalesce">Opt_D_dump_asm_coalesce</a> </li><li>| <a href="#v:Opt_D_dump_asm_regalloc">Opt_D_dump_asm_regalloc</a> </li><li>| <a href="#v:Opt_D_dump_asm_regalloc_stages">Opt_D_dump_asm_regalloc_stages</a> </li><li>| <a href="#v:Opt_D_dump_asm_conflicts">Opt_D_dump_asm_conflicts</a> </li><li>| <a href="#v:Opt_D_dump_asm_stats">Opt_D_dump_asm_stats</a> </li><li>| <a href="#v:Opt_D_dump_asm_expanded">Opt_D_dump_asm_expanded</a> </li><li>| <a href="#v:Opt_D_dump_llvm">Opt_D_dump_llvm</a> </li><li>| <a href="#v:Opt_D_dump_core_stats">Opt_D_dump_core_stats</a> </li><li>| <a href="#v:Opt_D_dump_cpranal">Opt_D_dump_cpranal</a> </li><li>| <a href="#v:Opt_D_dump_deriv">Opt_D_dump_deriv</a> </li><li>| <a href="#v:Opt_D_dump_ds">Opt_D_dump_ds</a> </li><li>| <a href="#v:Opt_D_dump_flatC">Opt_D_dump_flatC</a> </li><li>| <a href="#v:Opt_D_dump_foreign">Opt_D_dump_foreign</a> </li><li>| <a href="#v:Opt_D_dump_inlinings">Opt_D_dump_inlinings</a> </li><li>| <a href="#v:Opt_D_dump_rule_firings">Opt_D_dump_rule_firings</a> </li><li>| <a href="#v:Opt_D_dump_rule_rewrites">Opt_D_dump_rule_rewrites</a> </li><li>| <a href="#v:Opt_D_dump_occur_anal">Opt_D_dump_occur_anal</a> </li><li>| <a href="#v:Opt_D_dump_parsed">Opt_D_dump_parsed</a> </li><li>| <a href="#v:Opt_D_dump_rn">Opt_D_dump_rn</a> </li><li>| <a href="#v:Opt_D_dump_core_pipeline">Opt_D_dump_core_pipeline</a> </li><li>| <a href="#v:Opt_D_dump_simpl">Opt_D_dump_simpl</a> </li><li>| <a href="#v:Opt_D_dump_simpl_iterations">Opt_D_dump_simpl_iterations</a> </li><li>| <a href="#v:Opt_D_dump_simpl_phases">Opt_D_dump_simpl_phases</a> </li><li>| <a href="#v:Opt_D_dump_spec">Opt_D_dump_spec</a> </li><li>| <a href="#v:Opt_D_dump_prep">Opt_D_dump_prep</a> </li><li>| <a href="#v:Opt_D_dump_stg">Opt_D_dump_stg</a> </li><li>| <a href="#v:Opt_D_dump_stranal">Opt_D_dump_stranal</a> </li><li>| <a href="#v:Opt_D_dump_tc">Opt_D_dump_tc</a> </li><li>| <a href="#v:Opt_D_dump_types">Opt_D_dump_types</a> </li><li>| <a href="#v:Opt_D_dump_rules">Opt_D_dump_rules</a> </li><li>| <a href="#v:Opt_D_dump_cse">Opt_D_dump_cse</a> </li><li>| <a href="#v:Opt_D_dump_worker_wrapper">Opt_D_dump_worker_wrapper</a> </li><li>| <a href="#v:Opt_D_dump_rn_trace">Opt_D_dump_rn_trace</a> </li><li>| <a href="#v:Opt_D_dump_rn_stats">Opt_D_dump_rn_stats</a> </li><li>| <a href="#v:Opt_D_dump_opt_cmm">Opt_D_dump_opt_cmm</a> </li><li>| <a href="#v:Opt_D_dump_simpl_stats">Opt_D_dump_simpl_stats</a> </li><li>| <a href="#v:Opt_D_dump_cs_trace">Opt_D_dump_cs_trace</a> </li><li>| <a href="#v:Opt_D_dump_tc_trace">Opt_D_dump_tc_trace</a> </li><li>| <a href="#v:Opt_D_dump_if_trace">Opt_D_dump_if_trace</a> </li><li>| <a href="#v:Opt_D_dump_vt_trace">Opt_D_dump_vt_trace</a> </li><li>| <a href="#v:Opt_D_dump_splices">Opt_D_dump_splices</a> </li><li>| <a href="#v:Opt_D_dump_BCOs">Opt_D_dump_BCOs</a> </li><li>| <a href="#v:Opt_D_dump_vect">Opt_D_dump_vect</a> </li><li>| <a href="#v:Opt_D_dump_ticked">Opt_D_dump_ticked</a> </li><li>| <a href="#v:Opt_D_dump_rtti">Opt_D_dump_rtti</a> </li><li>| <a href="#v:Opt_D_source_stats">Opt_D_source_stats</a> </li><li>| <a href="#v:Opt_D_verbose_core2core">Opt_D_verbose_core2core</a> </li><li>| <a href="#v:Opt_D_verbose_stg2stg">Opt_D_verbose_stg2stg</a> </li><li>| <a href="#v:Opt_D_dump_hi">Opt_D_dump_hi</a> </li><li>| <a href="#v:Opt_D_dump_hi_diffs">Opt_D_dump_hi_diffs</a> </li><li>| <a href="#v:Opt_D_dump_minimal_imports">Opt_D_dump_minimal_imports</a> </li><li>| <a href="#v:Opt_D_dump_mod_cycles">Opt_D_dump_mod_cycles</a> </li><li>| <a href="#v:Opt_D_dump_view_pattern_commoning">Opt_D_dump_view_pattern_commoning</a> </li><li>| <a href="#v:Opt_D_faststring_stats">Opt_D_faststring_stats</a> </li><li>| <a href="#v:Opt_DumpToFile">Opt_DumpToFile</a> </li><li>| <a href="#v:Opt_D_no_debug_output">Opt_D_no_debug_output</a> </li><li>| <a href="#v:Opt_DoCoreLinting">Opt_DoCoreLinting</a> </li><li>| <a href="#v:Opt_DoStgLinting">Opt_DoStgLinting</a> </li><li>| <a href="#v:Opt_DoCmmLinting">Opt_DoCmmLinting</a> </li><li>| <a href="#v:Opt_DoAsmLinting">Opt_DoAsmLinting</a> </li><li>| <a href="#v:Opt_NoLlvmMangler">Opt_NoLlvmMangler</a> </li><li>| <a href="#v:Opt_WarnIsError">Opt_WarnIsError</a> </li><li>| <a href="#v:Opt_PrintExplicitForalls">Opt_PrintExplicitForalls</a> </li><li>| <a href="#v:Opt_Strictness">Opt_Strictness</a> </li><li>| <a href="#v:Opt_FullLaziness">Opt_FullLaziness</a> </li><li>| <a href="#v:Opt_FloatIn">Opt_FloatIn</a> </li><li>| <a href="#v:Opt_Specialise">Opt_Specialise</a> </li><li>| <a href="#v:Opt_StaticArgumentTransformation">Opt_StaticArgumentTransformation</a> </li><li>| <a href="#v:Opt_CSE">Opt_CSE</a> </li><li>| <a href="#v:Opt_LiberateCase">Opt_LiberateCase</a> </li><li>| <a href="#v:Opt_SpecConstr">Opt_SpecConstr</a> </li><li>| <a href="#v:Opt_DoLambdaEtaExpansion">Opt_DoLambdaEtaExpansion</a> </li><li>| <a href="#v:Opt_IgnoreAsserts">Opt_IgnoreAsserts</a> </li><li>| <a href="#v:Opt_DoEtaReduction">Opt_DoEtaReduction</a> </li><li>| <a href="#v:Opt_CaseMerge">Opt_CaseMerge</a> </li><li>| <a href="#v:Opt_UnboxStrictFields">Opt_UnboxStrictFields</a> </li><li>| <a href="#v:Opt_DictsCheap">Opt_DictsCheap</a> </li><li>| <a href="#v:Opt_EnableRewriteRules">Opt_EnableRewriteRules</a> </li><li>| <a href="#v:Opt_Vectorise">Opt_Vectorise</a> </li><li>| <a href="#v:Opt_RegsGraph">Opt_RegsGraph</a> </li><li>| <a href="#v:Opt_RegsIterative">Opt_RegsIterative</a> </li><li>| <a href="#v:Opt_PedanticBottoms">Opt_PedanticBottoms</a> </li><li>| <a href="#v:Opt_IgnoreInterfacePragmas">Opt_IgnoreInterfacePragmas</a> </li><li>| <a href="#v:Opt_OmitInterfacePragmas">Opt_OmitInterfacePragmas</a> </li><li>| <a href="#v:Opt_ExposeAllUnfoldings">Opt_ExposeAllUnfoldings</a> </li><li>| <a href="#v:Opt_AutoSccsOnIndividualCafs">Opt_AutoSccsOnIndividualCafs</a> </li><li>| <a href="#v:Opt_ProfCountEntries">Opt_ProfCountEntries</a> </li><li>| <a href="#v:Opt_Pp">Opt_Pp</a> </li><li>| <a href="#v:Opt_ForceRecomp">Opt_ForceRecomp</a> </li><li>| <a href="#v:Opt_ExcessPrecision">Opt_ExcessPrecision</a> </li><li>| <a href="#v:Opt_EagerBlackHoling">Opt_EagerBlackHoling</a> </li><li>| <a href="#v:Opt_ReadUserPackageConf">Opt_ReadUserPackageConf</a> </li><li>| <a href="#v:Opt_NoHsMain">Opt_NoHsMain</a> </li><li>| <a href="#v:Opt_SplitObjs">Opt_SplitObjs</a> </li><li>| <a href="#v:Opt_StgStats">Opt_StgStats</a> </li><li>| <a href="#v:Opt_HideAllPackages">Opt_HideAllPackages</a> </li><li>| <a href="#v:Opt_PrintBindResult">Opt_PrintBindResult</a> </li><li>| <a href="#v:Opt_Haddock">Opt_Haddock</a> </li><li>| <a href="#v:Opt_HaddockOptions">Opt_HaddockOptions</a> </li><li>| <a href="#v:Opt_Hpc_No_Auto">Opt_Hpc_No_Auto</a> </li><li>| <a href="#v:Opt_BreakOnException">Opt_BreakOnException</a> </li><li>| <a href="#v:Opt_BreakOnError">Opt_BreakOnError</a> </li><li>| <a href="#v:Opt_PrintEvldWithShow">Opt_PrintEvldWithShow</a> </li><li>| <a href="#v:Opt_PrintBindContents">Opt_PrintBindContents</a> </li><li>| <a href="#v:Opt_GenManifest">Opt_GenManifest</a> </li><li>| <a href="#v:Opt_EmbedManifest">Opt_EmbedManifest</a> </li><li>| <a href="#v:Opt_EmitExternalCore">Opt_EmitExternalCore</a> </li><li>| <a href="#v:Opt_SharedImplib">Opt_SharedImplib</a> </li><li>| <a href="#v:Opt_BuildingCabalPackage">Opt_BuildingCabalPackage</a> </li><li>| <a href="#v:Opt_SSE2">Opt_SSE2</a> </li><li>| <a href="#v:Opt_SSE4_2">Opt_SSE4_2</a> </li><li>| <a href="#v:Opt_GhciSandbox">Opt_GhciSandbox</a> </li><li>| <a href="#v:Opt_GhciHistory">Opt_GhciHistory</a> </li><li>| <a href="#v:Opt_HelpfulErrors">Opt_HelpfulErrors</a> </li><li>| <a href="#v:Opt_RunCPS">Opt_RunCPS</a> </li><li>| <a href="#v:Opt_RunCPSZ">Opt_RunCPSZ</a> </li><li>| <a href="#v:Opt_AutoLinkPackages">Opt_AutoLinkPackages</a> </li><li>| <a href="#v:Opt_ImplicitImportQualified">Opt_ImplicitImportQualified</a> </li><li>| <a href="#v:Opt_TryNewCodeGen">Opt_TryNewCodeGen</a> </li><li>| <a href="#v:Opt_KeepHiDiffs">Opt_KeepHiDiffs</a> </li><li>| <a href="#v:Opt_KeepHcFiles">Opt_KeepHcFiles</a> </li><li>| <a href="#v:Opt_KeepSFiles">Opt_KeepSFiles</a> </li><li>| <a href="#v:Opt_KeepTmpFiles">Opt_KeepTmpFiles</a> </li><li>| <a href="#v:Opt_KeepRawTokenStream">Opt_KeepRawTokenStream</a> </li><li>| <a href="#v:Opt_KeepLlvmFiles">Opt_KeepLlvmFiles</a> </li><li>| <a href="#v:Opt_DistrustAllPackages">Opt_DistrustAllPackages</a> </li><li>| <a href="#v:Opt_PackageTrust">Opt_PackageTrust</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Severity">Severity</a> <ul class="subs"><li>= <a href="#v:SevOutput">SevOutput</a> </li><li>| <a href="#v:SevInfo">SevInfo</a> </li><li>| <a href="#v:SevWarning">SevWarning</a> </li><li>| <a href="#v:SevError">SevError</a> </li><li>| <a href="#v:SevFatal">SevFatal</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:HscTarget">HscTarget</a> <ul class="subs"><li>= <a href="#v:HscC">HscC</a> </li><li>| <a href="#v:HscAsm">HscAsm</a> </li><li>| <a href="#v:HscLlvm">HscLlvm</a> </li><li>| <a href="#v:HscInterpreted">HscInterpreted</a> </li><li>| <a href="#v:HscNothing">HscNothing</a> </li></ul></li><li class="src short"><a href="#v:dopt">dopt</a> :: <a href="GHC.html#t:DynFlag">DynFlag</a> -> <a href="GHC.html#t:DynFlags">DynFlags</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:GhcMode">GhcMode</a> <ul class="subs"><li>= <a href="#v:CompManager">CompManager</a> </li><li>| <a href="#v:OneShot">OneShot</a> </li><li>| <a href="#v:MkDepend">MkDepend</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:GhcLink">GhcLink</a> <ul class="subs"><li>= <a href="#v:NoLink">NoLink</a> </li><li>| <a href="#v:LinkBinary">LinkBinary</a> </li><li>| <a href="#v:LinkInMemory">LinkInMemory</a> </li><li>| <a href="#v:LinkDynLib">LinkDynLib</a> </li></ul></li><li class="src short"><a href="#v:defaultObjectTarget">defaultObjectTarget</a> :: <a href="GHC.html#t:HscTarget">HscTarget</a></li><li class="src short"><a href="#v:parseDynamicFlags">parseDynamicFlags</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="GHC.html#t:DynFlags">DynFlags</a> -> [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>] -> m (<a href="GHC.html#t:DynFlags">DynFlags</a>, [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>], [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>])</li><li class="src short"><a href="#v:getSessionDynFlags">getSessionDynFlags</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="GHC.html#t:DynFlags">DynFlags</a></li><li class="src short"><a href="#v:setSessionDynFlags">setSessionDynFlags</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:DynFlags">DynFlags</a> -> m [<a href="GHC.html#t:PackageId">PackageId</a>]</li><li class="src short"><a href="#v:parseStaticFlags">parseStaticFlags</a> :: [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>] -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ([<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>], [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>])</li><li class="src short"><span class="keyword">data</span> <a href="#t:Target">Target</a> = <a href="#v:Target">Target</a> {<ul class="subs"><li><a href="#v:targetId">targetId</a> :: <a href="GHC.html#t:TargetId">TargetId</a></li><li><a href="#v:targetAllowObjCode">targetAllowObjCode</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:targetContents">targetContents</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="StringBuffer.html#t:StringBuffer">StringBuffer</a>, <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a>)</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:TargetId">TargetId</a> <ul class="subs"><li>= <a href="#v:TargetModule">TargetModule</a> <a href="GHC.html#t:ModuleName">ModuleName</a> </li><li>| <a href="#v:TargetFile">TargetFile</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Phase">Phase</a>) </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Phase">Phase</a> </li><li class="src short"><a href="#v:setTargets">setTargets</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => [<a href="GHC.html#t:Target">Target</a>] -> m ()</li><li class="src short"><a href="#v:getTargets">getTargets</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:Target">Target</a>]</li><li class="src short"><a href="#v:addTarget">addTarget</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Target">Target</a> -> m ()</li><li class="src short"><a href="#v:removeTarget">removeTarget</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:TargetId">TargetId</a> -> m ()</li><li class="src short"><a href="#v:guessTarget">guessTarget</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Phase">Phase</a> -> m <a href="GHC.html#t:Target">Target</a></li><li class="src short"><a href="#v:depanal">depanal</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => [<a href="GHC.html#t:ModuleName">ModuleName</a>] -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> m <a href="GHC.html#t:ModuleGraph">ModuleGraph</a></li><li class="src short"><a href="#v:load">load</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:LoadHowMuch">LoadHowMuch</a> -> m <a href="GHC.html#t:SuccessFlag">SuccessFlag</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:LoadHowMuch">LoadHowMuch</a> <ul class="subs"><li>= <a href="#v:LoadAllTargets">LoadAllTargets</a> </li><li>| <a href="#v:LoadUpTo">LoadUpTo</a> <a href="GHC.html#t:ModuleName">ModuleName</a> </li><li>| <a href="#v:LoadDependenciesOf">LoadDependenciesOf</a> <a href="GHC.html#t:ModuleName">ModuleName</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:InteractiveImport">InteractiveImport</a> <ul class="subs"><li>= <a href="#v:IIDecl">IIDecl</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>) </li><li>| <a href="#v:IIModule">IIModule</a> <a href="GHC.html#t:Module">Module</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:SuccessFlag">SuccessFlag</a> <ul class="subs"><li>= <a href="#v:Succeeded">Succeeded</a> </li><li>| <a href="#v:Failed">Failed</a> </li></ul></li><li class="src short"><a href="#v:succeeded">succeeded</a> :: <a href="GHC.html#t:SuccessFlag">SuccessFlag</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:failed">failed</a> :: <a href="GHC.html#t:SuccessFlag">SuccessFlag</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:defaultWarnErrLogger">defaultWarnErrLogger</a> :: <a href="GHC.html#t:WarnErrLogger">WarnErrLogger</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:WarnErrLogger">WarnErrLogger</a> = <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:SourceError">SourceError</a> -> m ()</li><li class="src short"><a href="#v:workingDirectoryChanged">workingDirectoryChanged</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ()</li><li class="src short"><a href="#v:parseModule">parseModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModSummary">ModSummary</a> -> m <a href="GHC.html#t:ParsedModule">ParsedModule</a></li><li class="src short"><a href="#v:typecheckModule">typecheckModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ParsedModule">ParsedModule</a> -> m <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></li><li class="src short"><a href="#v:desugarModule">desugarModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a> -> m <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></li><li class="src short"><a href="#v:loadModule">loadModule</a> :: (<a href="GHC.html#t:TypecheckedMod">TypecheckedMod</a> mod, <a href="GHC.html#t:GhcMonad">GhcMonad</a> m) => mod -> m mod</li><li class="src short"><span class="keyword">data</span> <a href="#t:ParsedModule">ParsedModule</a> = <a href="#v:ParsedModule">ParsedModule</a> {<ul class="subs"><li><a href="#v:pm_mod_summary">pm_mod_summary</a> :: <a href="GHC.html#t:ModSummary">ModSummary</a></li><li><a href="#v:pm_parsed_source">pm_parsed_source</a> :: <a href="GHC.html#t:ParsedSource">ParsedSource</a></li><li><a href="#v:pm_extra_src_files">pm_extra_src_files</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:TypecheckedModule">TypecheckedModule</a> = <a href="#v:TypecheckedModule">TypecheckedModule</a> {<ul class="subs"><li><a href="#v:tm_parsed_module">tm_parsed_module</a> :: <a href="GHC.html#t:ParsedModule">ParsedModule</a></li><li><a href="#v:tm_renamed_source">tm_renamed_source</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:RenamedSource">RenamedSource</a></li><li><a href="#v:tm_typechecked_source">tm_typechecked_source</a> :: <a href="GHC.html#t:TypecheckedSource">TypecheckedSource</a></li><li><a href="#v:tm_checked_module_info">tm_checked_module_info</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a></li><li><a href="#v:tm_internals_">tm_internals_</a> :: (<a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:DesugaredModule">DesugaredModule</a> = <a href="#v:DesugaredModule">DesugaredModule</a> {<ul class="subs"><li><a href="#v:dm_typechecked_module">dm_typechecked_module</a> :: <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></li><li><a href="#v:dm_core_module">dm_core_module</a> :: <a href="HscTypes.html#t:ModGuts">ModGuts</a></li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:TypecheckedSource">TypecheckedSource</a> = <a href="HsBinds.html#t:LHsBinds">LHsBinds</a> <a href="GHC.html#t:Id">Id</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ParsedSource">ParsedSource</a> = <a href="GHC.html#t:Located">Located</a> (<a href="HsSyn.html#t:HsModule">HsModule</a> <a href="GHC.html#t:RdrName">RdrName</a>)</li><li class="src short"><span class="keyword">type</span> <a href="#t:RenamedSource">RenamedSource</a> = (<a href="HsDecls.html#t:HsGroup">HsGroup</a> <a href="GHC.html#t:Name">Name</a>, [<a href="HsImpExp.html#t:LImportDecl">LImportDecl</a> <a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="HsImpExp.html#t:LIE">LIE</a> <a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HsDoc.html#t:LHsDocString">LHsDocString</a>)</li><li class="src short"><span class="keyword">class</span> <a href="GHC.html#t:ParsedMod">ParsedMod</a> m => <a href="#t:TypecheckedMod">TypecheckedMod</a> m <span class="keyword">where</span><ul class="subs"><li><a href="#v:renamedSource">renamedSource</a> :: m -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:RenamedSource">RenamedSource</a></li><li><a href="#v:typecheckedSource">typecheckedSource</a> :: m -> <a href="GHC.html#t:TypecheckedSource">TypecheckedSource</a></li><li><a href="#v:moduleInfo">moduleInfo</a> :: m -> <a href="GHC.html#t:ModuleInfo">ModuleInfo</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:ParsedMod">ParsedMod</a> m <span class="keyword">where</span><ul class="subs"><li><a href="#v:parsedSource">parsedSource</a> :: m -> <a href="GHC.html#t:ParsedSource">ParsedSource</a></li></ul></li><li class="src short"><a href="#v:coreModule">coreModule</a> :: DesugaredMod m => m -> <a href="HscTypes.html#t:ModGuts">ModGuts</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:CoreModule">CoreModule</a> = <a href="#v:CoreModule">CoreModule</a> {<ul class="subs"><li><a href="#v:cm_module">cm_module</a> :: !<a href="GHC.html#t:Module">Module</a></li><li><a href="#v:cm_types">cm_types</a> :: !<a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li><a href="#v:cm_binds">cm_binds</a> :: <a href="CoreSyn.html#t:CoreProgram">CoreProgram</a></li><li><a href="#v:cm_safe">cm_safe</a> :: <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></li></ul>}</li><li class="src short"><a href="#v:compileToCoreModule">compileToCoreModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="GHC.html#t:CoreModule">CoreModule</a></li><li class="src short"><a href="#v:compileToCoreSimplified">compileToCoreSimplified</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="GHC.html#t:CoreModule">CoreModule</a></li><li class="src short"><a href="#v:compileCoreToObj">compileCoreToObj</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="GHC.html#t:CoreModule">CoreModule</a> -> m ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:ModuleGraph">ModuleGraph</a> = [<a href="GHC.html#t:ModSummary">ModSummary</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:ModSummary">ModSummary</a> = <a href="#v:ModSummary">ModSummary</a> {<ul class="subs"><li><a href="#v:ms_mod">ms_mod</a> :: <a href="GHC.html#t:Module">Module</a></li><li><a href="#v:ms_hsc_src">ms_hsc_src</a> :: <a href="DriverPhases.html#t:HscSource">HscSource</a></li><li><a href="#v:ms_location">ms_location</a> :: <a href="GHC.html#t:ModLocation">ModLocation</a></li><li><a href="#v:ms_hs_date">ms_hs_date</a> :: <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></li><li><a href="#v:ms_obj_date">ms_obj_date</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></li><li><a href="#v:ms_srcimps">ms_srcimps</a> :: [<a href="GHC.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)]</li><li><a href="#v:ms_textual_imps">ms_textual_imps</a> :: [<a href="GHC.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)]</li><li><a href="#v:ms_hspp_file">ms_hspp_file</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:ms_hspp_opts">ms_hspp_opts</a> :: <a href="GHC.html#t:DynFlags">DynFlags</a></li><li><a href="#v:ms_hspp_buf">ms_hspp_buf</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="StringBuffer.html#t:StringBuffer">StringBuffer</a></li></ul>}</li><li class="src short"><a href="#v:ms_mod_name">ms_mod_name</a> :: <a href="GHC.html#t:ModSummary">ModSummary</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ModLocation">ModLocation</a> = <a href="#v:ModLocation">ModLocation</a> {<ul class="subs"><li><a href="#v:ml_hs_file">ml_hs_file</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:ml_hi_file">ml_hi_file</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:ml_obj_file">ml_obj_file</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li></ul>}</li><li class="src short"><a href="#v:getModSummary">getModSummary</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> m <a href="GHC.html#t:ModSummary">ModSummary</a></li><li class="src short"><a href="#v:getModuleGraph">getModuleGraph</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="GHC.html#t:ModuleGraph">ModuleGraph</a></li><li class="src short"><a href="#v:isLoaded">isLoaded</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:topSortModuleGraph">topSortModuleGraph</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> [<a href="GHC.html#t:ModSummary">ModSummary</a>] -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:ModuleName">ModuleName</a> -> [<a href="Digraph.html#t:SCC">SCC</a> <a href="GHC.html#t:ModSummary">ModSummary</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:ModuleInfo">ModuleInfo</a> </li><li class="src short"><a href="#v:getModuleInfo">getModuleInfo</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:ModuleInfo">ModuleInfo</a>)</li><li class="src short"><a href="#v:modInfoTyThings">modInfoTyThings</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> [<a href="GHC.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:modInfoTopLevelScope">modInfoTopLevelScope</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="GHC.html#t:Name">Name</a>]</li><li class="src short"><a href="#v:modInfoExports">modInfoExports</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> [<a href="GHC.html#t:Name">Name</a>]</li><li class="src short"><a href="#v:modInfoInstances">modInfoInstances</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> [<a href="GHC.html#t:Instance">Instance</a>]</li><li class="src short"><a href="#v:modInfoIsExportedName">modInfoIsExportedName</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:modInfoLookupName">modInfoLookupName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:TyThing">TyThing</a>)</li><li class="src short"><a href="#v:modInfoIface">modInfoIface</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:ModIface">ModIface</a></li><li class="src short"><a href="#v:modInfoSafe">modInfoSafe</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></li><li class="src short"><a href="#v:lookupGlobalName">lookupGlobalName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:TyThing">TyThing</a>)</li><li class="src short"><a href="#v:findGlobalAnns">findGlobalAnns</a> :: (<a href="GHC.html#t:GhcMonad">GhcMonad</a> m, <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> a) => ([<a href="../base-4.5.1.0/Data-Word.html#t:Word8">Word8</a>] -> a) -> <a href="Annotations.html#t:AnnTarget">AnnTarget</a> <a href="GHC.html#t:Name">Name</a> -> m [a]</li><li class="src short"><a href="#v:mkPrintUnqualifiedForModule">mkPrintUnqualifiedForModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:PrintUnqualified">PrintUnqualified</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:ModIface">ModIface</a> = <a href="#v:ModIface">ModIface</a> {<ul class="subs"><li><a href="#v:mi_module">mi_module</a> :: !<a href="GHC.html#t:Module">Module</a></li><li><a href="#v:mi_iface_hash">mi_iface_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:mi_mod_hash">mi_mod_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:mi_flag_hash">mi_flag_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:mi_orphan">mi_orphan</a> :: !<a href="HscTypes.html#t:WhetherHasOrphans">WhetherHasOrphans</a></li><li><a href="#v:mi_finsts">mi_finsts</a> :: !WhetherHasFamInst</li><li><a href="#v:mi_boot">mi_boot</a> :: !<a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a></li><li><a href="#v:mi_deps">mi_deps</a> :: <a href="HscTypes.html#t:Dependencies">Dependencies</a></li><li><a href="#v:mi_usages">mi_usages</a> :: [<a href="HscTypes.html#t:Usage">Usage</a>]</li><li><a href="#v:mi_exports">mi_exports</a> :: ![<a href="HscTypes.html#t:IfaceExport">IfaceExport</a>]</li><li><a href="#v:mi_exp_hash">mi_exp_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:mi_used_th">mi_used_th</a> :: !<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:mi_fixities">mi_fixities</a> :: [(<a href="OccName.html#t:OccName">OccName</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>)]</li><li><a href="#v:mi_warns">mi_warns</a> :: <a href="HscTypes.html#t:Warnings">Warnings</a></li><li><a href="#v:mi_anns">mi_anns</a> :: [<a href="IfaceSyn.html#t:IfaceAnnotation">IfaceAnnotation</a>]</li><li><a href="#v:mi_decls">mi_decls</a> :: [(<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>, <a href="IfaceSyn.html#t:IfaceDecl">IfaceDecl</a>)]</li><li><a href="#v:mi_globals">mi_globals</a> :: !(<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a>)</li><li><a href="#v:mi_insts">mi_insts</a> :: [<a href="IfaceSyn.html#t:IfaceInst">IfaceInst</a>]</li><li><a href="#v:mi_fam_insts">mi_fam_insts</a> :: [<a href="IfaceSyn.html#t:IfaceFamInst">IfaceFamInst</a>]</li><li><a href="#v:mi_rules">mi_rules</a> :: [<a href="IfaceSyn.html#t:IfaceRule">IfaceRule</a>]</li><li><a href="#v:mi_orphan_hash">mi_orphan_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:mi_vect_info">mi_vect_info</a> :: !<a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</a></li><li><a href="#v:mi_warn_fn">mi_warn_fn</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="BasicTypes.html#t:WarningTxt">WarningTxt</a></li><li><a href="#v:mi_fix_fn">mi_fix_fn</a> :: <a href="OccName.html#t:OccName">OccName</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a></li><li><a href="#v:mi_hash_fn">mi_hash_fn</a> :: <a href="OccName.html#t:OccName">OccName</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="OccName.html#t:OccName">OccName</a>, <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>)</li><li><a href="#v:mi_hpc">mi_hpc</a> :: !<a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a></li><li><a href="#v:mi_trust">mi_trust</a> :: !<a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></li><li><a href="#v:mi_trust_pkg">mi_trust_pkg</a> :: !<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:SafeHaskellMode">SafeHaskellMode</a> <ul class="subs"><li>= <a href="#v:Sf_None">Sf_None</a> </li><li>| <a href="#v:Sf_Unsafe">Sf_Unsafe</a> </li><li>| <a href="#v:Sf_Trustworthy">Sf_Trustworthy</a> </li><li>| <a href="#v:Sf_Safe">Sf_Safe</a> </li><li>| <a href="#v:Sf_SafeInfered">Sf_SafeInfered</a> </li></ul></li><li class="src short"><a href="#v:packageDbModules">packageDbModules</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> m [<a href="GHC.html#t:Module">Module</a>]</li><li class="src short"><span class="keyword">type</span> <a href="#t:PrintUnqualified">PrintUnqualified</a> = (QueryQualifyName, QueryQualifyModule)</li><li class="src short"><a href="#v:alwaysQualify">alwaysQualify</a> :: <a href="GHC.html#t:PrintUnqualified">PrintUnqualified</a></li><li class="src short"><a href="#v:getBindings">getBindings</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:getInsts">getInsts</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ([<a href="GHC.html#t:Instance">Instance</a>], [<a href="FamInstEnv.html#t:FamInst">FamInst</a>])</li><li class="src short"><a href="#v:getPrintUnqual">getPrintUnqual</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="GHC.html#t:PrintUnqualified">PrintUnqualified</a></li><li class="src short"><a href="#v:findModule">findModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="FastString.html#t:FastString">FastString</a> -> m <a href="GHC.html#t:Module">Module</a></li><li class="src short"><a href="#v:lookupModule">lookupModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="FastString.html#t:FastString">FastString</a> -> m <a href="GHC.html#t:Module">Module</a></li><li class="src short"><a href="#v:setContext">setContext</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => [<a href="GHC.html#t:InteractiveImport">InteractiveImport</a>] -> m ()</li><li class="src short"><a href="#v:getContext">getContext</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:InteractiveImport">InteractiveImport</a>]</li><li class="src short"><a href="#v:getNamesInScope">getNamesInScope</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:Name">Name</a>]</li><li class="src short"><a href="#v:getRdrNamesInScope">getRdrNamesInScope</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:RdrName">RdrName</a>]</li><li class="src short"><a href="#v:getGRE">getGRE</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></li><li class="src short"><a href="#v:moduleIsInterpreted">moduleIsInterpreted</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:getInfo">getInfo</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="GHC.html#t:TyThing">TyThing</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>, [<a href="GHC.html#t:Instance">Instance</a>]))</li><li class="src short"><a href="#v:exprType">exprType</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m <a href="GHC.html#t:Type">Type</a></li><li class="src short"><a href="#v:typeKind">typeKind</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m (<a href="GHC.html#t:Type">Type</a>, <a href="GHC.html#t:Kind">Kind</a>)</li><li class="src short"><a href="#v:parseName">parseName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m [<a href="GHC.html#t:Name">Name</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:RunResult">RunResult</a> <ul class="subs"><li>= <a href="#v:RunOk">RunOk</a> [<a href="GHC.html#t:Name">Name</a>] </li><li>| <a href="#v:RunException">RunException</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> </li><li>| <a href="#v:RunBreak">RunBreak</a> <a href="../base-4.5.1.0/Control-Concurrent.html#t:ThreadId">ThreadId</a> [<a href="GHC.html#t:Name">Name</a>] (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:BreakInfo">BreakInfo</a>) </li></ul></li><li class="src short"><a href="#v:runStmt">runStmt</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:SingleStep">SingleStep</a> -> m <a href="GHC.html#t:RunResult">RunResult</a></li><li class="src short"><a href="#v:runStmtWithLocation">runStmtWithLocation</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:SingleStep">SingleStep</a> -> m <a href="GHC.html#t:RunResult">RunResult</a></li><li class="src short"><a href="#v:runDecls">runDecls</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m [<a href="GHC.html#t:Name">Name</a>]</li><li class="src short"><a href="#v:runDeclsWithLocation">runDeclsWithLocation</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m [<a href="GHC.html#t:Name">Name</a>]</li><li class="src short"><a href="#v:parseImportDecl">parseImportDecl</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:SingleStep">SingleStep</a> <ul class="subs"><li>= <a href="#v:RunToCompletion">RunToCompletion</a> </li><li>| <a href="#v:SingleStep">SingleStep</a> </li><li>| <a href="#v:RunAndLogSteps">RunAndLogSteps</a> </li></ul></li><li class="src short"><a href="#v:resume">resume</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => (<a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="GHC.html#t:SingleStep">SingleStep</a> -> m <a href="GHC.html#t:RunResult">RunResult</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Resume">Resume</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:History">History</a> </li><li class="src short"><a href="#v:getHistorySpan">getHistorySpan</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:History">History</a> -> m <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:getHistoryModule">getHistoryModule</a> :: <a href="GHC.html#t:History">History</a> -> <a href="GHC.html#t:Module">Module</a></li><li class="src short"><a href="#v:getResumeContext">getResumeContext</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:Resume">Resume</a>]</li><li class="src short"><a href="#v:abandon">abandon</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:abandonAll">abandonAll</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:back">back</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ([<a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="GHC.html#t:SrcSpan">SrcSpan</a>)</li><li class="src short"><a href="#v:forward">forward</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ([<a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="GHC.html#t:SrcSpan">SrcSpan</a>)</li><li class="src short"><a href="#v:showModule">showModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModSummary">ModSummary</a> -> m <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:isModuleInterpreted">isModuleInterpreted</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModSummary">ModSummary</a> -> m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:compileExpr">compileExpr</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m <a href="GHC.html#t:HValue">HValue</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:HValue">HValue</a> </li><li class="src short"><a href="#v:dynCompileExpr">dynCompileExpr</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m <a href="../base-4.5.1.0/Data-Dynamic.html#t:Dynamic">Dynamic</a></li><li class="src short"><a href="#v:obtainTermFromId">obtainTermFromId</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="GHC.html#t:Id">Id</a> -> m <a href="RtClosureInspect.html#t:Term">Term</a></li><li class="src short"><a href="#v:obtainTermFromVal">obtainTermFromVal</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="GHC.html#t:Type">Type</a> -> a -> m <a href="RtClosureInspect.html#t:Term">Term</a></li><li class="src short"><a href="#v:reconstructType">reconstructType</a> :: <a href="GHC.html#t:HscEnv">HscEnv</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Type">Type</a>)</li><li class="src short"><a href="#v:modInfoModBreaks">modInfoModBreaks</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:ModBreaks">ModBreaks</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ModBreaks">ModBreaks</a> = <a href="#v:ModBreaks">ModBreaks</a> {<ul class="subs"><li><a href="#v:modBreaks_flags">modBreaks_flags</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a></li><li><a href="#v:modBreaks_locs">modBreaks_locs</a> :: !(<a href="../array-0.4.0.0/Data-Array.html#t:Array">Array</a> <a href="GHC.html#t:BreakIndex">BreakIndex</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a>)</li><li><a href="#v:modBreaks_vars">modBreaks_vars</a> :: !(<a href="../array-0.4.0.0/Data-Array.html#t:Array">Array</a> <a href="GHC.html#t:BreakIndex">BreakIndex</a> [<a href="OccName.html#t:OccName">OccName</a>])</li><li><a href="#v:modBreaks_decls">modBreaks_decls</a> :: !(<a href="../array-0.4.0.0/Data-Array.html#t:Array">Array</a> <a href="GHC.html#t:BreakIndex">BreakIndex</a> [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>])</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:BreakIndex">BreakIndex</a> = <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:BreakInfo">BreakInfo</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:BreakArray">BreakArray</a> </li><li class="src short"><a href="#v:setBreakOn">setBreakOn</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:setBreakOff">setBreakOff</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:getBreak">getBreak</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Word.html#t:Word">Word</a>)</li><li class="src short"><a href="#v:lookupName">lookupName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:TyThing">TyThing</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:PackageId">PackageId</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:Module">Module</a> </li><li class="src short"><a href="#v:mkModule">mkModule</a> :: <a href="GHC.html#t:PackageId">PackageId</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="GHC.html#t:Module">Module</a></li><li class="src short"><a href="#v:pprModule">pprModule</a> :: <a href="GHC.html#t:Module">Module</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:moduleName">moduleName</a> :: <a href="GHC.html#t:Module">Module</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a></li><li class="src short"><a href="#v:modulePackageId">modulePackageId</a> :: <a href="GHC.html#t:Module">Module</a> -> <a href="GHC.html#t:PackageId">PackageId</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ModuleName">ModuleName</a> </li><li class="src short"><a href="#v:mkModuleName">mkModuleName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a></li><li class="src short"><a href="#v:moduleNameString">moduleNameString</a> :: <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Name">Name</a> </li><li class="src short"><a href="#v:isExternalName">isExternalName</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:nameModule">nameModule</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="GHC.html#t:Module">Module</a></li><li class="src short"><a href="#v:pprParenSymName">pprParenSymName</a> :: <a href="GHC.html#t:NamedThing">NamedThing</a> a => a -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:nameSrcSpan">nameSrcSpan</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><span class="keyword">class</span> <a href="#t:NamedThing">NamedThing</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:getOccName">getOccName</a> :: a -> <a href="OccName.html#t:OccName">OccName</a></li><li><a href="#v:getName">getName</a> :: a -> <a href="GHC.html#t:Name">Name</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:RdrName">RdrName</a> <ul class="subs"><li>= <a href="#v:Unqual">Unqual</a> <a href="OccName.html#t:OccName">OccName</a> </li><li>| <a href="#v:Qual">Qual</a> <a href="GHC.html#t:ModuleName">ModuleName</a> <a href="OccName.html#t:OccName">OccName</a> </li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Id">Id</a> = <a href="Var.html#t:Var">Var</a></li><li class="src short"><a href="#v:idType">idType</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="GHC.html#t:Kind">Kind</a></li><li class="src short"><a href="#v:isImplicitId">isImplicitId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isDeadBinder">isDeadBinder</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isExportedId">isExportedId</a> :: <a href="Var.html#t:Var">Var</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isLocalId">isLocalId</a> :: <a href="Var.html#t:Var">Var</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isGlobalId">isGlobalId</a> :: <a href="Var.html#t:Var">Var</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isRecordSelector">isRecordSelector</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isPrimOpId">isPrimOpId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isFCallId">isFCallId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isClassOpId_maybe">isClassOpId_maybe</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Class">Class</a></li><li class="src short"><a href="#v:isDataConWorkId">isDataConWorkId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:idDataCon">idDataCon</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="GHC.html#t:DataCon">DataCon</a></li><li class="src short"><a href="#v:isBottomingId">isBottomingId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isDictonaryId">isDictonaryId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:recordSelectorFieldLabel">recordSelectorFieldLabel</a> :: <a href="GHC.html#t:Id">Id</a> -> (<a href="GHC.html#t:TyCon">TyCon</a>, <a href="TyCon.html#t:FieldLabel">FieldLabel</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:TyCon">TyCon</a> </li><li class="src short"><a href="#v:tyConTyVars">tyConTyVars</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> [<a href="GHC.html#t:TyVar">TyVar</a>]</li><li class="src short"><a href="#v:tyConDataCons">tyConDataCons</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> [<a href="GHC.html#t:DataCon">DataCon</a>]</li><li class="src short"><a href="#v:tyConArity">tyConArity</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="BasicTypes.html#t:Arity">Arity</a></li><li class="src short"><a href="#v:isClassTyCon">isClassTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSynTyCon">isSynTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isNewTyCon">isNewTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isPrimTyCon">isPrimTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isFunTyCon">isFunTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isFamilyTyCon">isFamilyTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:tyConClass_maybe">tyConClass_maybe</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Class">Class</a></li><li class="src short"><a href="#v:synTyConDefn">synTyConDefn</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], <a href="GHC.html#t:Type">Type</a>)</li><li class="src short"><a href="#v:synTyConType">synTyConType</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="GHC.html#t:Type">Type</a></li><li class="src short"><a href="#v:synTyConResKind">synTyConResKind</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="GHC.html#t:Kind">Kind</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TyVar">TyVar</a> = <a href="Var.html#t:Var">Var</a></li><li class="src short"><a href="#v:alphaTyVars">alphaTyVars</a> :: [<a href="GHC.html#t:TyVar">TyVar</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:DataCon">DataCon</a> </li><li class="src short"><a href="#v:dataConSig">dataConSig</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], <a href="GHC.html#t:ThetaType">ThetaType</a>, [<a href="GHC.html#t:Type">Type</a>], <a href="GHC.html#t:Type">Type</a>)</li><li class="src short"><a href="#v:dataConType">dataConType</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="GHC.html#t:Type">Type</a></li><li class="src short"><a href="#v:dataConTyCon">dataConTyCon</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="GHC.html#t:TyCon">TyCon</a></li><li class="src short"><a href="#v:dataConFieldLabels">dataConFieldLabels</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> [<a href="TyCon.html#t:FieldLabel">FieldLabel</a>]</li><li class="src short"><a href="#v:dataConIsInfix">dataConIsInfix</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isVanillaDataCon">isVanillaDataCon</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:dataConUserType">dataConUserType</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="GHC.html#t:Type">Type</a></li><li class="src short"><a href="#v:dataConStrictMarks">dataConStrictMarks</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> [<a href="BasicTypes.html#t:HsBang">HsBang</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:StrictnessMark">StrictnessMark</a> <ul class="subs"><li>= <a href="#v:MarkedStrict">MarkedStrict</a> </li><li>| <a href="#v:NotMarkedStrict">NotMarkedStrict</a> </li></ul></li><li class="src short"><a href="#v:isMarkedStrict">isMarkedStrict</a> :: <a href="GHC.html#t:StrictnessMark">StrictnessMark</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Class">Class</a> </li><li class="src short"><a href="#v:classMethods">classMethods</a> :: <a href="GHC.html#t:Class">Class</a> -> [<a href="GHC.html#t:Id">Id</a>]</li><li class="src short"><a href="#v:classSCTheta">classSCTheta</a> :: <a href="GHC.html#t:Class">Class</a> -> [<a href="GHC.html#t:PredType">PredType</a>]</li><li class="src short"><a href="#v:classTvsFds">classTvsFds</a> :: <a href="GHC.html#t:Class">Class</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], [<a href="Class.html#t:FunDep">FunDep</a> <a href="GHC.html#t:TyVar">TyVar</a>])</li><li class="src short"><a href="#v:classATs">classATs</a> :: <a href="GHC.html#t:Class">Class</a> -> [<a href="GHC.html#t:TyCon">TyCon</a>]</li><li class="src short"><a href="#v:pprFundeps">pprFundeps</a> :: <a href="Outputable.html#t:Outputable">Outputable</a> a => [<a href="Class.html#t:FunDep">FunDep</a> a] -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Instance">Instance</a> </li><li class="src short"><a href="#v:instanceDFunId">instanceDFunId</a> :: <a href="GHC.html#t:Instance">Instance</a> -> <a href="Var.html#t:DFunId">DFunId</a></li><li class="src short"><a href="#v:pprInstance">pprInstance</a> :: <a href="GHC.html#t:Instance">Instance</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:pprInstanceHdr">pprInstanceHdr</a> :: <a href="GHC.html#t:Instance">Instance</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:pprFamInst">pprFamInst</a> :: <a href="FamInstEnv.html#t:FamInst">FamInst</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:pprFamInstHdr">pprFamInstHdr</a> :: <a href="FamInstEnv.html#t:FamInst">FamInst</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Type">Type</a> </li><li class="src short"><a href="#v:splitForAllTys">splitForAllTys</a> :: <a href="GHC.html#t:Type">Type</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], <a href="GHC.html#t:Type">Type</a>)</li><li class="src short"><a href="#v:funResultTy">funResultTy</a> :: <a href="GHC.html#t:Type">Type</a> -> <a href="GHC.html#t:Type">Type</a></li><li class="src short"><a href="#v:pprParendType">pprParendType</a> :: <a href="GHC.html#t:Type">Type</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:pprTypeApp">pprTypeApp</a> :: <a href="GHC.html#t:NamedThing">NamedThing</a> a => a -> [<a href="GHC.html#t:Type">Type</a>] -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Kind">Kind</a> = <a href="GHC.html#t:Type">Type</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:PredType">PredType</a> = <a href="GHC.html#t:Type">Type</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ThetaType">ThetaType</a> = [<a href="GHC.html#t:PredType">PredType</a>]</li><li class="src short"><a href="#v:pprForAll">pprForAll</a> :: [<a href="GHC.html#t:TyVar">TyVar</a>] -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:pprThetaArrowTy">pprThetaArrowTy</a> :: <a href="GHC.html#t:ThetaType">ThetaType</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:TyThing">TyThing</a> <ul class="subs"><li>= <a href="#v:AnId">AnId</a> <a href="GHC.html#t:Id">Id</a> </li><li>| <a href="#v:ADataCon">ADataCon</a> <a href="GHC.html#t:DataCon">DataCon</a> </li><li>| <a href="#v:ATyCon">ATyCon</a> <a href="GHC.html#t:TyCon">TyCon</a> </li><li>| <a href="#v:ACoAxiom">ACoAxiom</a> <a href="TyCon.html#t:CoAxiom">CoAxiom</a> </li></ul></li><li class="src short">module <a href="HsSyn.html">HsSyn</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:FixityDirection">FixityDirection</a> <ul class="subs"><li>= <a href="#v:InfixL">InfixL</a> </li><li>| <a href="#v:InfixR">InfixR</a> </li><li>| <a href="#v:InfixN">InfixN</a> </li></ul></li><li class="src short"><a href="#v:defaultFixity">defaultFixity</a> :: <a href="BasicTypes.html#t:Fixity">Fixity</a></li><li class="src short"><a href="#v:maxPrecedence">maxPrecedence</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:negateFixity">negateFixity</a> :: <a href="BasicTypes.html#t:Fixity">Fixity</a></li><li class="src short"><a href="#v:compareFixity">compareFixity</a> :: <a href="BasicTypes.html#t:Fixity">Fixity</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a> -> (<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:SrcLoc">SrcLoc</a> <ul class="subs"><li>= <a href="#v:RealSrcLoc">RealSrcLoc</a> !<a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> </li><li>| <a href="#v:UnhelpfulLoc">UnhelpfulLoc</a> <a href="FastString.html#t:FastString">FastString</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:RealSrcLoc">RealSrcLoc</a> </li><li class="src short"><a href="#v:mkSrcLoc">mkSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:noSrcLoc">noSrcLoc</a> :: <a href="GHC.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:srcLocFile">srcLocFile</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="FastString.html#t:FastString">FastString</a></li><li class="src short"><a href="#v:srcLocLine">srcLocLine</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcLocCol">srcLocCol</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SrcSpan">SrcSpan</a> <ul class="subs"><li>= <a href="#v:RealSrcSpan">RealSrcSpan</a> !<a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> </li><li>| <a href="#v:UnhelpfulSpan">UnhelpfulSpan</a> !<a href="FastString.html#t:FastString">FastString</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:RealSrcSpan">RealSrcSpan</a> </li><li class="src short"><a href="#v:mkSrcSpan">mkSrcSpan</a> :: <a href="GHC.html#t:SrcLoc">SrcLoc</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:srcLocSpan">srcLocSpan</a> :: <a href="GHC.html#t:SrcLoc">SrcLoc</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:isGoodSrcSpan">isGoodSrcSpan</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:noSrcSpan">noSrcSpan</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:srcSpanStart">srcSpanStart</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:srcSpanEnd">srcSpanEnd</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:srcSpanFile">srcSpanFile</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="FastString.html#t:FastString">FastString</a></li><li class="src short"><a href="#v:srcSpanStartLine">srcSpanStartLine</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcSpanEndLine">srcSpanEndLine</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcSpanStartCol">srcSpanStartCol</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcSpanEndCol">srcSpanEndCol</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:GenLocated">GenLocated</a> l e = <a href="#v:L">L</a> l e</li><li class="src short"><span class="keyword">type</span> <a href="#t:Located">Located</a> e = <a href="GHC.html#t:GenLocated">GenLocated</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a> e</li><li class="src short"><a href="#v:noLoc">noLoc</a> :: e -> <a href="GHC.html#t:Located">Located</a> e</li><li class="src short"><a href="#v:mkGeneralLocated">mkGeneralLocated</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> e -> <a href="GHC.html#t:Located">Located</a> e</li><li class="src short"><a href="#v:getLoc">getLoc</a> :: <a href="GHC.html#t:GenLocated">GenLocated</a> l e -> l</li><li class="src short"><a href="#v:unLoc">unLoc</a> :: <a href="GHC.html#t:GenLocated">GenLocated</a> l e -> e</li><li class="src short"><a href="#v:eqLocated">eqLocated</a> :: <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> a -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:cmpLocated">cmpLocated</a> :: <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> a -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:combineLocs">combineLocs</a> :: <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> b -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:addCLoc">addCLoc</a> :: <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> b -> c -> <a href="GHC.html#t:Located">Located</a> c</li><li class="src short"><a href="#v:leftmost_smallest">leftmost_smallest</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:leftmost_largest">leftmost_largest</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:rightmost">rightmost</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:spans">spans</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>) -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSubspanOf">isSubspanOf</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:GhcException">GhcException</a> <ul class="subs"><li>= <a href="#v:PhaseFailed">PhaseFailed</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> <a href="../base-4.5.1.0/System-Exit.html#t:ExitCode">ExitCode</a> </li><li>| <a href="#v:Signal">Signal</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> </li><li>| <a href="#v:UsageError">UsageError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li><li>| <a href="#v:CmdLineError">CmdLineError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li><li>| <a href="#v:Panic">Panic</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li><li>| <a href="#v:Sorry">Sorry</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li><li>| <a href="#v:InstallationError">InstallationError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li><li>| <a href="#v:ProgramError">ProgramError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li></ul></li><li class="src short"><a href="#v:showGhcException">showGhcException</a> :: <a href="GHC.html#t:GhcException">GhcException</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Token">Token</a> </li><li class="src short"><a href="#v:getTokenStream">getTokenStream</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m [<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>]</li><li class="src short"><a href="#v:getRichTokenStream">getRichTokenStream</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m [(<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)]</li><li class="src short"><a href="#v:showRichTokenStream">showRichTokenStream</a> :: [(<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)] -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:addSourceToTokens">addSourceToTokens</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="StringBuffer.html#t:StringBuffer">StringBuffer</a> -> [<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>] -> [(<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)]</li><li class="src short"><a href="#v:parser">parser</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:DynFlags">DynFlags</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="../base-4.5.1.0/Data-Either.html#t:Either">Either</a> <a href="ErrUtils.html#t:ErrorMessages">ErrorMessages</a> (<a href="ErrUtils.html#t:WarningMessages">WarningMessages</a>, <a href="GHC.html#t:Located">Located</a> (<a href="HsSyn.html#t:HsModule">HsModule</a> <a href="GHC.html#t:RdrName">RdrName</a>))</li><li class="src short"><a href="#v:cyclicModuleErr">cyclicModuleErr</a> :: [<a href="GHC.html#t:ModSummary">ModSummary</a>] -> <a href="Outputable.html#t:SDoc">SDoc</a></li></ul></div><div id="interface"><h1 id="g:1">Initialisation </h1><div class="top"><p class="src"><a name="v:defaultErrorHandler" class="def">defaultErrorHandler</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="DynFlags.html#t:LogAction">LogAction</a> -> m a -> m a</p><div class="doc"><p>Install some default exception handlers and run the inner computation. Unless you want to handle exceptions yourself, you should wrap this around the top level of your program. The default handlers output the error message(s) to stderr and exit cleanly. </p></div></div><div class="top"><p class="src"><a name="v:defaultCleanupHandler" class="def">defaultCleanupHandler</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="GHC.html#t:DynFlags">DynFlags</a> -> m a -> m a</p><div class="doc"><p>Install a default cleanup handler to remove temporary files deposited by a GHC run. This is seperate from <code><a href="GHC.html#v:defaultErrorHandler">defaultErrorHandler</a></code>, because you might want to override the error handling, but still get the ordinary cleanup behaviour. </p></div></div><h1 id="g:2">GHC Monad </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Ghc" class="def">Ghc</a> a </p><div class="doc"><p>A minimal implementation of a <code><a href="GHC.html#t:GhcMonad">GhcMonad</a></code>. If you need a custom monad, e.g., to maintain additional state consider wrapping this monad or using <code><a href="GHC.html#t:GhcT">GhcT</a></code>. </p></div><div class="subs instances"><p id="control.i:Ghc" class="caption collapser" onclick="toggleSection('i:Ghc')">Instances</p><div id="section.i:Ghc" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="MonadUtils.html#t:MonadFix">MonadFix</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="MonadUtils.html#t:MonadIO">MonadIO</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:GhcMonad">GhcMonad</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GhcT" class="def">GhcT</a> m a </p><div class="doc"><p>A monad transformer to add GHC specific features to another monad. </p><p>Note that the wrapped monad must support IO and handling of exceptions. </p></div><div class="subs instances"><p id="control.i:GhcT" class="caption collapser" onclick="toggleSection('i:GhcT')">Instances</p><div id="section.i:GhcT" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="GHC.html#t:GhcT">GhcT</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m => <a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="GHC.html#t:GhcT">GhcT</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m => <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> (<a href="GHC.html#t:GhcT">GhcT</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="MonadUtils.html#t:MonadIO">MonadIO</a> m => <a href="MonadUtils.html#t:MonadIO">MonadIO</a> (<a href="GHC.html#t:GhcT">GhcT</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m, <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="GHC.html#t:GhcMonad">GhcMonad</a> (<a href="GHC.html#t:GhcT">GhcT</a> m)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m, <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m) => <a name="t:GhcMonad" class="def">GhcMonad</a> m <span class="keyword">where</span></p><div class="doc"><p>A monad that has all the features needed by GHC API calls. </p><p>In short, a GHC monad </p><ul><li> allows embedding of IO actions, </li><li> can log warnings, </li><li> allows handling of (extensible) exceptions, and </li><li> maintains a current session. </li></ul><p>If you do not use <code><a href="GHC.html#t:Ghc">Ghc</a></code> or <code><a href="GHC.html#t:GhcT">GhcT</a></code>, make sure to call <code><a href="GHC.html#v:initGhcMonad">initGhcMonad</a></code> before any call to the GHC API functions can occur. </p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:getSession" class="def">getSession</a> :: m <a href="GHC.html#t:HscEnv">HscEnv</a></p><p class="src"><a name="v:setSession" class="def">setSession</a> :: <a href="GHC.html#t:HscEnv">HscEnv</a> -> m ()</p></div><div class="subs instances"><p id="control.i:GhcMonad" class="caption collapser" onclick="toggleSection('i:GhcMonad')">Instances</p><div id="section.i:GhcMonad" class="show"><table><tr><td class="src"><a href="GHC.html#t:GhcMonad">GhcMonad</a> <a href="GHC.html#t:Ghc">Ghc</a></td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m, <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m) => <a href="GHC.html#t:GhcMonad">GhcMonad</a> (<a href="GHC.html#t:GhcT">GhcT</a> m)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HscEnv" class="def">HscEnv</a> </p><div class="doc"><p>Hscenv is like <code>Session</code>, except that some of the fields are immutable. An HscEnv is used to compile a single module from plain Haskell source code (after preprocessing) to either C, assembly or C--. Things like the module graph don't change during a single compilation. </p><p>Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module. </p></div></div><div class="top"><p class="src"><a name="v:runGhc" class="def">runGhc</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>See argument to <code><a href="GHC.html#v:initGhcMonad">initGhcMonad</a></code>. </p></td></tr><tr><td class="src">-> <a href="GHC.html#t:Ghc">Ghc</a> a</td><td class="doc"><p>The action to perform. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Run function for the <code><a href="GHC.html#t:Ghc">Ghc</a></code> monad. </p><p>It initialises the GHC session and warnings via <code><a href="GHC.html#v:initGhcMonad">initGhcMonad</a></code>. Each call to this function will create a new session which should not be shared among several threads. </p><p>Any errors not handled inside the <code><a href="GHC.html#t:Ghc">Ghc</a></code> action are propagated as IO exceptions. </p></div></div><div class="top"><p class="src"><a name="v:runGhcT" class="def">runGhcT</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> m, <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>See argument to <code><a href="GHC.html#v:initGhcMonad">initGhcMonad</a></code>. </p></td></tr><tr><td class="src">-> <a href="GHC.html#t:GhcT">GhcT</a> m a</td><td class="doc"><p>The action to perform. </p></td></tr><tr><td class="src">-> m a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Run function for <code><a href="GHC.html#t:GhcT">GhcT</a></code> monad transformer. </p><p>It initialises the GHC session and warnings via <code><a href="GHC.html#v:initGhcMonad">initGhcMonad</a></code>. Each call to this function will create a new session which should not be shared among several threads. </p></div></div><div class="top"><p class="src"><a name="v:initGhcMonad" class="def">initGhcMonad</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> m ()</p><div class="doc"><p>Initialise a GHC session. </p><p>If you implement a custom <code><a href="GHC.html#t:GhcMonad">GhcMonad</a></code> you must call this function in the monad run function. It will initialise the session variable and clear all warnings. </p><p>The first argument should point to the directory where GHC's library files reside. More precisely, this should be the output of <code>ghc --print-libdir</code> of the version of GHC the module using this API is compiled with. For portability, you should use the <code>ghc-paths</code> package, available at <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ghc-paths">http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ghc-paths</a>. </p></div></div><div class="top"><p class="src"><a name="v:gcatch" class="def">gcatch</a> :: (<a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m, <a href="Panic.html#t:Exception">Exception</a> e) => m a -> (e -> m a) -> m a</p><div class="doc"><p>Generalised version of <code><a href="../base-4.5.1.0/Control-Exception-Base.html#v:catch">catch</a></code>, allowing an arbitrary exception handling monad instead of just <code><a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:gbracket" class="def">gbracket</a> :: <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m => m a -> (a -> m b) -> (a -> m c) -> m c</p><div class="doc"><p>Generalised version of <code><a href="../base-4.5.1.0/Control-Exception-Base.html#v:bracket">bracket</a></code>, allowing an arbitrary exception handling monad instead of just <code><a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:gfinally" class="def">gfinally</a> :: <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m => m a -> m b -> m a</p><div class="doc"><p>Generalised version of <code><a href="../base-4.5.1.0/Control-Exception-Base.html#v:finally">finally</a></code>, allowing an arbitrary exception handling monad instead of just <code><a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:printException" class="def">printException</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="HscTypes.html#t:SourceError">SourceError</a> -> m ()</p><div class="doc"><p>Print the error message and all warnings. Useful inside exception handlers. Clears warnings after printing. </p></div></div><div class="top"><p class="src"><a name="v:printExceptionAndWarnings" class="def">printExceptionAndWarnings</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="HscTypes.html#t:SourceError">SourceError</a> -> m ()</p></div><div class="top"><p class="src"><a name="v:handleSourceError" class="def">handleSourceError</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Exception.html#t:ExceptionMonad">ExceptionMonad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> (<a href="HscTypes.html#t:SourceError">SourceError</a> -> m a)</td><td class="doc"><p>exception handler </p></td></tr><tr><td class="src">-> m a</td><td class="doc"><p>action to perform </p></td></tr><tr><td class="src">-> m a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Perform the given action and call the exception handler if the action throws a <code><a href="HscTypes.html#t:SourceError">SourceError</a></code>. See <code><a href="HscTypes.html#t:SourceError">SourceError</a></code> for more information. </p></div></div><div class="top"><p class="src"><a name="v:needsTemplateHaskell" class="def">needsTemplateHaskell</a> :: <a href="GHC.html#t:ModuleGraph">ModuleGraph</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Determines whether a set of modules requires Template Haskell. </p><p>Note that if the session's <code><a href="GHC.html#t:DynFlags">DynFlags</a></code> enabled Template Haskell when <code><a href="GHC.html#v:depanal">depanal</a></code> was called, then each module in the returned module graph will have Template Haskell enabled whether it is actually needed or not. </p></div></div><h1 id="g:3">Flags and settings </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DynFlags" class="def">DynFlags</a> </p><div class="doc"><p>Contains not only a collection of <code><a href="GHC.html#t:DynFlag">DynFlag</a></code>s but also a plethora of information relating to the compilation of a single file or GHC session </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:DynFlags" class="def">DynFlags</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:ghcMode" class="def">ghcMode</a> :: <a href="GHC.html#t:GhcMode">GhcMode</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:ghcLink" class="def">ghcLink</a> :: <a href="GHC.html#t:GhcLink">GhcLink</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hscTarget" class="def">hscTarget</a> :: <a href="GHC.html#t:HscTarget">HscTarget</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:settings" class="def">settings</a> :: <a href="DynFlags.html#t:Settings">Settings</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hscOutName" class="def">hscOutName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>Name of the output file </p></dd><dt class="src"><a name="v:extCoreName" class="def">extCoreName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>Name of the .hcr output file </p></dd><dt class="src"><a name="v:verbosity" class="def">verbosity</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Verbosity level: see Note [Verbosity levels] </p></dd><dt class="src"><a name="v:optLevel" class="def">optLevel</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Optimisation level </p></dd><dt class="src"><a name="v:simplPhases" class="def">simplPhases</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Number of simplifier phases </p></dd><dt class="src"><a name="v:maxSimplIterations" class="def">maxSimplIterations</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Max simplifier iterations </p></dd><dt class="src"><a name="v:shouldDumpSimplPhase" class="def">shouldDumpSimplPhase</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:ruleCheck" class="def">ruleCheck</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:strictnessBefore" class="def">strictnessBefore</a> :: [<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>]</dt><dd class="doc"><p>Additional demand analysis </p></dd><dt class="src"><a name="v:simplTickFactor" class="def">simplTickFactor</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Multiplier for simplifier ticks </p></dd><dt class="src"><a name="v:specConstrThreshold" class="def">specConstrThreshold</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Threshold for SpecConstr </p></dd><dt class="src"><a name="v:specConstrCount" class="def">specConstrCount</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Max number of specialisations for any one function </p></dd><dt class="src"><a name="v:liberateCaseThreshold" class="def">liberateCaseThreshold</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Threshold for LiberateCase </p></dd><dt class="src"><a name="v:floatLamArgs" class="def">floatLamArgs</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Arg count for lambda floating See CoreMonad.FloatOutSwitches </p></dd><dt class="src"><a name="v:cmdlineHcIncludes" class="def">cmdlineHcIncludes</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc"><pre>-#includes</pre></dd><dt class="src"><a name="v:importPaths" class="def">importPaths</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mainModIs" class="def">mainModIs</a> :: <a href="GHC.html#t:Module">Module</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mainFunIs" class="def">mainFunIs</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:ctxtStkDepth" class="def">ctxtStkDepth</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>Typechecker context stack depth </p></dd><dt class="src"><a name="v:thisPackage" class="def">thisPackage</a> :: <a href="GHC.html#t:PackageId">PackageId</a></dt><dd class="doc"><p>name of package currently being compiled </p></dd><dt class="src"><a name="v:ways" class="def">ways</a> :: [<a href="StaticFlags.html#t:Way">Way</a>]</dt><dd class="doc"><p>Way flags from the command line </p></dd><dt class="src"><a name="v:buildTag" class="def">buildTag</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>The global "way" (e.g. "p" for prof) </p></dd><dt class="src"><a name="v:rtsBuildTag" class="def">rtsBuildTag</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>The RTS "way" </p></dd><dt class="src"><a name="v:splitInfo" class="def">splitInfo</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:objectDir" class="def">objectDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dylibInstallName" class="def">dylibInstallName</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hiDir" class="def">hiDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:stubDir" class="def">stubDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dumpDir" class="def">dumpDir</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:objectSuf" class="def">objectSuf</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hcSuf" class="def">hcSuf</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hiSuf" class="def">hiSuf</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:outputFile" class="def">outputFile</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:outputHi" class="def">outputHi</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dynLibLoader" class="def">dynLibLoader</a> :: <a href="DynFlags.html#t:DynLibLoader">DynLibLoader</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dumpPrefix" class="def">dumpPrefix</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc"><p>This is set by <code><a href="DriverPipeline.html#v:runPipeline">runPipeline</a></code> based on where its output is going. </p></dd><dt class="src"><a name="v:dumpPrefixForce" class="def">dumpPrefixForce</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc"><p>Override the <code><a href="GHC.html#v:dumpPrefix">dumpPrefix</a></code> set by <code><a href="DriverPipeline.html#v:runPipeline">runPipeline</a></code>. Set by <code>-ddump-file-prefix</code> </p></dd><dt class="src"><a name="v:includePaths" class="def">includePaths</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:libraryPaths" class="def">libraryPaths</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:frameworkPaths" class="def">frameworkPaths</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:cmdlineFrameworks" class="def">cmdlineFrameworks</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:rtsOpts" class="def">rtsOpts</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:rtsOptsEnabled" class="def">rtsOptsEnabled</a> :: <a href="DynFlags.html#t:RtsOptsEnabled">RtsOptsEnabled</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hpcDir" class="def">hpcDir</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>Path to store the .mix files </p></dd><dt class="src"><a name="v:pluginModNames" class="def">pluginModNames</a> :: [<a href="GHC.html#t:ModuleName">ModuleName</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:pluginModNameOpts" class="def">pluginModNameOpts</a> :: [(<a href="GHC.html#t:ModuleName">ModuleName</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:depMakefile" class="def">depMakefile</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:depIncludePkgDeps" class="def">depIncludePkgDeps</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:depExcludeMods" class="def">depExcludeMods</a> :: [<a href="GHC.html#t:ModuleName">ModuleName</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:depSuffixes" class="def">depSuffixes</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:extraPkgConfs" class="def">extraPkgConfs</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</dt><dd class="doc"><p>The <code>-package-conf</code> flags given on the command line, in the order they appeared. </p></dd><dt class="src"><a name="v:packageFlags" class="def">packageFlags</a> :: [<a href="DynFlags.html#t:PackageFlag">PackageFlag</a>]</dt><dd class="doc"><p>The <code>-package</code> and <code>-hide-package</code> flags from the command-line </p></dd><dt class="src"><a name="v:pkgDatabase" class="def">pkgDatabase</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="PackageConfig.html#t:PackageConfig">PackageConfig</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:pkgState" class="def">pkgState</a> :: <a href="Packages.html#t:PackageState">PackageState</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:filesToClean" class="def">filesToClean</a> :: <a href="IOEnv.html#t:IORef">IORef</a> [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dirsToClean" class="def">dirsToClean</a> :: <a href="IOEnv.html#t:IORef">IORef</a> (<a href="../containers-0.4.2.1/Data-Map.html#t:Map">Map</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:generatedDumps" class="def">generatedDumps</a> :: <a href="IOEnv.html#t:IORef">IORef</a> (<a href="../containers-0.4.2.1/Data-Set.html#t:Set">Set</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:flags" class="def">flags</a> :: <a href="../containers-0.4.2.1/Data-IntSet.html#t:IntSet">IntSet</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:warningFlags" class="def">warningFlags</a> :: <a href="../containers-0.4.2.1/Data-IntSet.html#t:IntSet">IntSet</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:language" class="def">language</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> Language</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:safeHaskell" class="def">safeHaskell</a> :: <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></dt><dd class="doc"><p>Safe Haskell mode </p></dd><dt class="src"><a name="v:thOnLoc" class="def">thOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:newDerivOnLoc" class="def">newDerivOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:pkgTrustOnLoc" class="def">pkgTrustOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:warnSafeOnLoc" class="def">warnSafeOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:warnUnsafeOnLoc" class="def">warnUnsafeOnLoc</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:extensions" class="def">extensions</a> :: [OnOff <a href="DynFlags.html#t:ExtensionFlag">ExtensionFlag</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:extensionFlags" class="def">extensionFlags</a> :: <a href="../containers-0.4.2.1/Data-IntSet.html#t:IntSet">IntSet</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:log_action" class="def">log_action</a> :: <a href="DynFlags.html#t:LogAction">LogAction</a></dt><dd class="doc"><p>Message output action: use <a href="ErrUtils.html">ErrUtils</a> instead of this if you can </p></dd><dt class="src"><a name="v:haddockOptions" class="def">haddockOptions</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:profAuto" class="def">profAuto</a> :: <a href="DynFlags.html#t:ProfAuto">ProfAuto</a></dt><dd class="doc"><p>what kind of {-<a name=" SCC "></a>-} to add automatically </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DynFlag" class="def">DynFlag</a> </p><div class="doc"><p>Enumerates the simple on-or-off dynamic flags </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Opt_D_dump_cmm" class="def">Opt_D_dump_cmm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_raw_cmm" class="def">Opt_D_dump_raw_cmm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz" class="def">Opt_D_dump_cmmz</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_pretty" class="def">Opt_D_dump_cmmz_pretty</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_cbe" class="def">Opt_D_dump_cmmz_cbe</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_proc" class="def">Opt_D_dump_cmmz_proc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_spills" class="def">Opt_D_dump_cmmz_spills</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_rewrite" class="def">Opt_D_dump_cmmz_rewrite</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_dead" class="def">Opt_D_dump_cmmz_dead</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_stub" class="def">Opt_D_dump_cmmz_stub</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_sp" class="def">Opt_D_dump_cmmz_sp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_procmap" class="def">Opt_D_dump_cmmz_procmap</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_split" class="def">Opt_D_dump_cmmz_split</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_lower" class="def">Opt_D_dump_cmmz_lower</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_info" class="def">Opt_D_dump_cmmz_info</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cmmz_cafs" class="def">Opt_D_dump_cmmz_cafs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cps_cmm" class="def">Opt_D_dump_cps_cmm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cvt_cmm" class="def">Opt_D_dump_cvt_cmm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm" class="def">Opt_D_dump_asm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_native" class="def">Opt_D_dump_asm_native</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_liveness" class="def">Opt_D_dump_asm_liveness</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_coalesce" class="def">Opt_D_dump_asm_coalesce</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_regalloc" class="def">Opt_D_dump_asm_regalloc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_regalloc_stages" class="def">Opt_D_dump_asm_regalloc_stages</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_conflicts" class="def">Opt_D_dump_asm_conflicts</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_stats" class="def">Opt_D_dump_asm_stats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_asm_expanded" class="def">Opt_D_dump_asm_expanded</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_llvm" class="def">Opt_D_dump_llvm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_core_stats" class="def">Opt_D_dump_core_stats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cpranal" class="def">Opt_D_dump_cpranal</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_deriv" class="def">Opt_D_dump_deriv</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_ds" class="def">Opt_D_dump_ds</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_flatC" class="def">Opt_D_dump_flatC</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_foreign" class="def">Opt_D_dump_foreign</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_inlinings" class="def">Opt_D_dump_inlinings</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rule_firings" class="def">Opt_D_dump_rule_firings</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rule_rewrites" class="def">Opt_D_dump_rule_rewrites</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_occur_anal" class="def">Opt_D_dump_occur_anal</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_parsed" class="def">Opt_D_dump_parsed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rn" class="def">Opt_D_dump_rn</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_core_pipeline" class="def">Opt_D_dump_core_pipeline</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_simpl" class="def">Opt_D_dump_simpl</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_simpl_iterations" class="def">Opt_D_dump_simpl_iterations</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_simpl_phases" class="def">Opt_D_dump_simpl_phases</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_spec" class="def">Opt_D_dump_spec</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_prep" class="def">Opt_D_dump_prep</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_stg" class="def">Opt_D_dump_stg</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_stranal" class="def">Opt_D_dump_stranal</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_tc" class="def">Opt_D_dump_tc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_types" class="def">Opt_D_dump_types</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rules" class="def">Opt_D_dump_rules</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cse" class="def">Opt_D_dump_cse</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_worker_wrapper" class="def">Opt_D_dump_worker_wrapper</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rn_trace" class="def">Opt_D_dump_rn_trace</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rn_stats" class="def">Opt_D_dump_rn_stats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_opt_cmm" class="def">Opt_D_dump_opt_cmm</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_simpl_stats" class="def">Opt_D_dump_simpl_stats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_cs_trace" class="def">Opt_D_dump_cs_trace</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_tc_trace" class="def">Opt_D_dump_tc_trace</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_if_trace" class="def">Opt_D_dump_if_trace</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_vt_trace" class="def">Opt_D_dump_vt_trace</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_splices" class="def">Opt_D_dump_splices</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_BCOs" class="def">Opt_D_dump_BCOs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_vect" class="def">Opt_D_dump_vect</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_ticked" class="def">Opt_D_dump_ticked</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_rtti" class="def">Opt_D_dump_rtti</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_source_stats" class="def">Opt_D_source_stats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_verbose_core2core" class="def">Opt_D_verbose_core2core</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_verbose_stg2stg" class="def">Opt_D_verbose_stg2stg</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_hi" class="def">Opt_D_dump_hi</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_hi_diffs" class="def">Opt_D_dump_hi_diffs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_minimal_imports" class="def">Opt_D_dump_minimal_imports</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_mod_cycles" class="def">Opt_D_dump_mod_cycles</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_dump_view_pattern_commoning" class="def">Opt_D_dump_view_pattern_commoning</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_D_faststring_stats" class="def">Opt_D_faststring_stats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DumpToFile" class="def">Opt_DumpToFile</a></td><td class="doc"><p>Append dump output to files instead of stdout. </p></td></tr><tr><td class="src"><a name="v:Opt_D_no_debug_output" class="def">Opt_D_no_debug_output</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DoCoreLinting" class="def">Opt_DoCoreLinting</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DoStgLinting" class="def">Opt_DoStgLinting</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DoCmmLinting" class="def">Opt_DoCmmLinting</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DoAsmLinting" class="def">Opt_DoAsmLinting</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_NoLlvmMangler" class="def">Opt_NoLlvmMangler</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_WarnIsError" class="def">Opt_WarnIsError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_PrintExplicitForalls" class="def">Opt_PrintExplicitForalls</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_Strictness" class="def">Opt_Strictness</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_FullLaziness" class="def">Opt_FullLaziness</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_FloatIn" class="def">Opt_FloatIn</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_Specialise" class="def">Opt_Specialise</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_StaticArgumentTransformation" class="def">Opt_StaticArgumentTransformation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_CSE" class="def">Opt_CSE</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_LiberateCase" class="def">Opt_LiberateCase</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_SpecConstr" class="def">Opt_SpecConstr</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DoLambdaEtaExpansion" class="def">Opt_DoLambdaEtaExpansion</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_IgnoreAsserts" class="def">Opt_IgnoreAsserts</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DoEtaReduction" class="def">Opt_DoEtaReduction</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_CaseMerge" class="def">Opt_CaseMerge</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_UnboxStrictFields" class="def">Opt_UnboxStrictFields</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DictsCheap" class="def">Opt_DictsCheap</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_EnableRewriteRules" class="def">Opt_EnableRewriteRules</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_Vectorise" class="def">Opt_Vectorise</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_RegsGraph" class="def">Opt_RegsGraph</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_RegsIterative" class="def">Opt_RegsIterative</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_PedanticBottoms" class="def">Opt_PedanticBottoms</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_IgnoreInterfacePragmas" class="def">Opt_IgnoreInterfacePragmas</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_OmitInterfacePragmas" class="def">Opt_OmitInterfacePragmas</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_ExposeAllUnfoldings" class="def">Opt_ExposeAllUnfoldings</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_AutoSccsOnIndividualCafs" class="def">Opt_AutoSccsOnIndividualCafs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_ProfCountEntries" class="def">Opt_ProfCountEntries</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_Pp" class="def">Opt_Pp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_ForceRecomp" class="def">Opt_ForceRecomp</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_ExcessPrecision" class="def">Opt_ExcessPrecision</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_EagerBlackHoling" class="def">Opt_EagerBlackHoling</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_ReadUserPackageConf" class="def">Opt_ReadUserPackageConf</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_NoHsMain" class="def">Opt_NoHsMain</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_SplitObjs" class="def">Opt_SplitObjs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_StgStats" class="def">Opt_StgStats</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_HideAllPackages" class="def">Opt_HideAllPackages</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_PrintBindResult" class="def">Opt_PrintBindResult</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_Haddock" class="def">Opt_Haddock</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_HaddockOptions" class="def">Opt_HaddockOptions</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_Hpc_No_Auto" class="def">Opt_Hpc_No_Auto</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_BreakOnException" class="def">Opt_BreakOnException</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_BreakOnError" class="def">Opt_BreakOnError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_PrintEvldWithShow" class="def">Opt_PrintEvldWithShow</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_PrintBindContents" class="def">Opt_PrintBindContents</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_GenManifest" class="def">Opt_GenManifest</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_EmbedManifest" class="def">Opt_EmbedManifest</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_EmitExternalCore" class="def">Opt_EmitExternalCore</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_SharedImplib" class="def">Opt_SharedImplib</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_BuildingCabalPackage" class="def">Opt_BuildingCabalPackage</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_SSE2" class="def">Opt_SSE2</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_SSE4_2" class="def">Opt_SSE4_2</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_GhciSandbox" class="def">Opt_GhciSandbox</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_GhciHistory" class="def">Opt_GhciHistory</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_HelpfulErrors" class="def">Opt_HelpfulErrors</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_RunCPS" class="def">Opt_RunCPS</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_RunCPSZ" class="def">Opt_RunCPSZ</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_AutoLinkPackages" class="def">Opt_AutoLinkPackages</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_ImplicitImportQualified" class="def">Opt_ImplicitImportQualified</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_TryNewCodeGen" class="def">Opt_TryNewCodeGen</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_KeepHiDiffs" class="def">Opt_KeepHiDiffs</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_KeepHcFiles" class="def">Opt_KeepHcFiles</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_KeepSFiles" class="def">Opt_KeepSFiles</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_KeepTmpFiles" class="def">Opt_KeepTmpFiles</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_KeepRawTokenStream" class="def">Opt_KeepRawTokenStream</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_KeepLlvmFiles" class="def">Opt_KeepLlvmFiles</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_DistrustAllPackages" class="def">Opt_DistrustAllPackages</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Opt_PackageTrust" class="def">Opt_PackageTrust</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:DynFlag" class="caption collapser" onclick="toggleSection('i:DynFlag')">Instances</p><div id="section.i:DynFlag" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Prelude.html#t:Enum">Enum</a> <a href="GHC.html#t:DynFlag">DynFlag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:DynFlag">DynFlag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:DynFlag">DynFlag</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Severity" class="def">Severity</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SevOutput" class="def">SevOutput</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SevInfo" class="def">SevInfo</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SevWarning" class="def">SevWarning</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SevError" class="def">SevError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SevFatal" class="def">SevFatal</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HscTarget" class="def">HscTarget</a> </p><div class="doc"><p>The target code type of the compilation (if any). </p><p>Whenever you change the target, also make sure to set <code><a href="GHC.html#v:ghcLink">ghcLink</a></code> to something sensible. </p><p><code><a href="GHC.html#v:HscNothing">HscNothing</a></code> can be used to avoid generating any output, however, note that: </p><ul><li> This will not run the desugaring step, thus no warnings generated in this step will be output. In particular, this includes warnings related to pattern matching. You can run the desugarer manually using <code><a href="GHC.html#v:desugarModule">desugarModule</a></code>. </li><li> If a program uses Template Haskell the typechecker may try to run code from an imported module. This will fail if no code has been generated for this module. You can use <code><a href="GHC.html#v:needsTemplateHaskell">needsTemplateHaskell</a></code> to detect whether this might be the case and choose to either switch to a different target or avoid typechecking such modules. (The latter may preferable for security reasons.) </li></ul></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HscC" class="def">HscC</a></td><td class="doc"><p>Generate C code. </p></td></tr><tr><td class="src"><a name="v:HscAsm" class="def">HscAsm</a></td><td class="doc"><p>Generate assembly using the native code generator. </p></td></tr><tr><td class="src"><a name="v:HscLlvm" class="def">HscLlvm</a></td><td class="doc"><p>Generate assembly using the llvm code generator. </p></td></tr><tr><td class="src"><a name="v:HscInterpreted" class="def">HscInterpreted</a></td><td class="doc"><p>Generate bytecode. (Requires <code><a href="GHC.html#v:LinkInMemory">LinkInMemory</a></code>) </p></td></tr><tr><td class="src"><a name="v:HscNothing" class="def">HscNothing</a></td><td class="doc"><p>Don't generate any code. See notes above. </p></td></tr></table></div><div class="subs instances"><p id="control.i:HscTarget" class="caption collapser" onclick="toggleSection('i:HscTarget')">Instances</p><div id="section.i:HscTarget" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:HscTarget">HscTarget</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:HscTarget">HscTarget</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:dopt" class="def">dopt</a> :: <a href="GHC.html#t:DynFlag">DynFlag</a> -> <a href="GHC.html#t:DynFlags">DynFlags</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test whether a <code><a href="GHC.html#t:DynFlag">DynFlag</a></code> is set </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GhcMode" class="def">GhcMode</a> </p><div class="doc"><p>The <code><a href="GHC.html#t:GhcMode">GhcMode</a></code> tells us whether we're doing multi-module compilation (controlled via the <a href="GHC.html">GHC</a> API) or one-shot (single-module) compilation. This makes a difference primarily to the <a href="Finder.html">Finder</a>: in one-shot mode we look for interface files for imported modules, but in multi-module mode we look for source files in order to check whether they need to be recompiled. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CompManager" class="def">CompManager</a></td><td class="doc"><p><code>--make</code>, GHCi, etc. </p></td></tr><tr><td class="src"><a name="v:OneShot" class="def">OneShot</a></td><td class="doc"><pre>ghc -c Foo.hs</pre></td></tr><tr><td class="src"><a name="v:MkDepend" class="def">MkDepend</a></td><td class="doc"><p><code>ghc -M</code>, see <a href="Finder.html">Finder</a> for why we need this </p></td></tr></table></div><div class="subs instances"><p id="control.i:GhcMode" class="caption collapser" onclick="toggleSection('i:GhcMode')">Instances</p><div id="section.i:GhcMode" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:GhcMode">GhcMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:GhcMode">GhcMode</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GhcLink" class="def">GhcLink</a> </p><div class="doc"><p>What to do in the link step, if there is one. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoLink" class="def">NoLink</a></td><td class="doc"><p>Don't link at all </p></td></tr><tr><td class="src"><a name="v:LinkBinary" class="def">LinkBinary</a></td><td class="doc"><p>Link object code into a binary </p></td></tr><tr><td class="src"><a name="v:LinkInMemory" class="def">LinkInMemory</a></td><td class="doc"><p>Use the in-memory dynamic linker (works for both bytecode and object code). </p></td></tr><tr><td class="src"><a name="v:LinkDynLib" class="def">LinkDynLib</a></td><td class="doc"><p>Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms) </p></td></tr></table></div><div class="subs instances"><p id="control.i:GhcLink" class="caption collapser" onclick="toggleSection('i:GhcLink')">Instances</p><div id="section.i:GhcLink" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:GhcLink">GhcLink</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:GhcLink">GhcLink</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:defaultObjectTarget" class="def">defaultObjectTarget</a> :: <a href="GHC.html#t:HscTarget">HscTarget</a></p><div class="doc"><p>The <code><a href="GHC.html#t:HscTarget">HscTarget</a></code> value corresponding to the default way to create object files on the current platform. </p></div></div><div class="top"><p class="src"><a name="v:parseDynamicFlags" class="def">parseDynamicFlags</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="GHC.html#t:DynFlags">DynFlags</a> -> [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>] -> m (<a href="GHC.html#t:DynFlags">DynFlags</a>, [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>], [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>])</p></div><div class="top"><p class="src"><a name="v:getSessionDynFlags" class="def">getSessionDynFlags</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="GHC.html#t:DynFlags">DynFlags</a></p><div class="doc"><p>Grabs the DynFlags from the Session </p></div></div><div class="top"><p class="src"><a name="v:setSessionDynFlags" class="def">setSessionDynFlags</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:DynFlags">DynFlags</a> -> m [<a href="GHC.html#t:PackageId">PackageId</a>]</p><div class="doc"><p>Updates the DynFlags in a Session. This also reads the package database (unless it has already been read), and prepares the compilers knowledge about packages. It can be called again to load new packages: just add new package flags to (packageFlags dflags). </p><p>Returns a list of new packages that may need to be linked in using the dynamic linker (see <code>linkPackages</code>) as a result of new package flags. If you are not doing linking or doing static linking, you can ignore the list of packages returned. </p></div></div><div class="top"><p class="src"><a name="v:parseStaticFlags" class="def">parseStaticFlags</a> :: [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>] -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ([<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>], [<a href="GHC.html#t:Located">Located</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>])</p><div class="doc"><p>Parses GHC's static flags from a list of command line arguments. </p><p>These flags are static in the sense that they can be set only once and they are global, meaning that they affect every instance of GHC running; multiple GHC threads will use the same flags. </p><p>This function must be called before any session is started, i.e., before the first call to <code><a href="GHC.html#v:withGhc">withGhc</a></code>. </p><p>Static flags are more of a hack and are static for more or less historical reasons. In the long run, most static flags should eventually become dynamic flags. </p><p>XXX: can we add an auto-generated list of static flags here? </p></div></div><h1 id="g:4">Targets </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Target" class="def">Target</a> </p><div class="doc"><p>A compilation target. </p><p>A target may be supplied with the actual text of the module. If so, use this instead of the file contents (this is for use in an IDE where the file hasn't been saved by the user yet). </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Target" class="def">Target</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:targetId" class="def">targetId</a> :: <a href="GHC.html#t:TargetId">TargetId</a></dt><dd class="doc"><p>module or filename </p></dd><dt class="src"><a name="v:targetAllowObjCode" class="def">targetAllowObjCode</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>object code allowed? </p></dd><dt class="src"><a name="v:targetContents" class="def">targetContents</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="StringBuffer.html#t:StringBuffer">StringBuffer</a>, <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a>)</dt><dd class="doc"><p>in-memory text buffer? </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Target" class="caption collapser" onclick="toggleSection('i:Target')">Instances</p><div id="section.i:Target" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Target">Target</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TargetId" class="def">TargetId</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TargetModule" class="def">TargetModule</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc"><p>A module name: search for the file </p></td></tr><tr><td class="src"><a name="v:TargetFile" class="def">TargetFile</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Phase">Phase</a>)</td><td class="doc"><p>A filename: preprocess & parse it to find the module name. If specified, the Phase indicates how to compile this file (which phase to start from). Nothing indicates the starting phase should be determined from the suffix of the filename. </p></td></tr></table></div><div class="subs instances"><p id="control.i:TargetId" class="caption collapser" onclick="toggleSection('i:TargetId')">Instances</p><div id="section.i:TargetId" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:TargetId">TargetId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:TargetId">TargetId</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Phase" class="def">Phase</a> </p><div class="subs instances"><p id="control.i:Phase" class="caption collapser" onclick="toggleSection('i:Phase')">Instances</p><div id="section.i:Phase" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:Phase">Phase</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:Phase">Phase</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Phase">Phase</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:setTargets" class="def">setTargets</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => [<a href="GHC.html#t:Target">Target</a>] -> m ()</p><div class="doc"><p>Sets the targets for this session. Each target may be a module name or a filename. The targets correspond to the set of root modules for the program/library. Unloading the current program is achieved by setting the current set of targets to be empty, followed by <code><a href="GHC.html#v:load">load</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:getTargets" class="def">getTargets</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:Target">Target</a>]</p><div class="doc"><p>Returns the current set of targets </p></div></div><div class="top"><p class="src"><a name="v:addTarget" class="def">addTarget</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Target">Target</a> -> m ()</p><div class="doc"><p>Add another target. </p></div></div><div class="top"><p class="src"><a name="v:removeTarget" class="def">removeTarget</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:TargetId">TargetId</a> -> m ()</p><div class="doc"><p>Remove a target </p></div></div><div class="top"><p class="src"><a name="v:guessTarget" class="def">guessTarget</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Phase">Phase</a> -> m <a href="GHC.html#t:Target">Target</a></p><div class="doc"><p>Attempts to guess what Target a string refers to. This function implements the <code>--make</code>/GHCi command-line syntax for filenames: </p><ul><li> if the string looks like a Haskell source filename, then interpret it as such </li><li> if adding a .hs or .lhs suffix yields the name of an existing file, then use that </li><li> otherwise interpret the string as a module name </li></ul></div></div><h1 id="g:5">Loading/compiling the program </h1><div class="top"><p class="src"><a name="v:depanal" class="def">depanal</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> [<a href="GHC.html#t:ModuleName">ModuleName</a>]</td><td class="doc"><p>excluded modules </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>allow duplicate roots </p></td></tr><tr><td class="src">-> m <a href="GHC.html#t:ModuleGraph">ModuleGraph</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Perform a dependency analysis starting from the current targets and update the session with the new module graph. </p><p>Dependency analysis entails parsing the <code>import</code> directives and may therefore require running certain preprocessors. </p><p>Note that each <code><a href="GHC.html#t:ModSummary">ModSummary</a></code> in the module graph caches its <code><a href="GHC.html#t:DynFlags">DynFlags</a></code>. These <code><a href="GHC.html#t:DynFlags">DynFlags</a></code> are determined by the <em>current</em> session <code><a href="GHC.html#t:DynFlags">DynFlags</a></code> and the <code>OPTIONS</code> and <code>LANGUAGE</code> pragmas of the parsed module. Thus if you want to changes to the <code><a href="GHC.html#t:DynFlags">DynFlags</a></code> to take effect you need to call this function again. </p></div></div><div class="top"><p class="src"><a name="v:load" class="def">load</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:LoadHowMuch">LoadHowMuch</a> -> m <a href="GHC.html#t:SuccessFlag">SuccessFlag</a></p><div class="doc"><p>Try to load the program. See <code><a href="GHC.html#t:LoadHowMuch">LoadHowMuch</a></code> for the different modes. </p><p>This function implements the core of GHC's <code>--make</code> mode. It preprocesses, compiles and loads the specified modules, avoiding re-compilation wherever possible. Depending on the target (see <code><a href="GHC.html#v:hscTarget">hscTarget</a></code>) compilating and loading may result in files being created on disk. </p><p>Calls the <code>reportModuleCompilationResult</code> callback after each compiling each module, whether successful or not. </p><p>Throw a <code><a href="HscTypes.html#t:SourceError">SourceError</a></code> if errors are encountered before the actual compilation starts (e.g., during dependency analysis). All other errors are reported using the callback. </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LoadHowMuch" class="def">LoadHowMuch</a> </p><div class="doc"><p>Describes which modules of the module graph need to be loaded. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LoadAllTargets" class="def">LoadAllTargets</a></td><td class="doc"><p>Load all targets and its dependencies. </p></td></tr><tr><td class="src"><a name="v:LoadUpTo" class="def">LoadUpTo</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc"><p>Load only the given module and its dependencies. </p></td></tr><tr><td class="src"><a name="v:LoadDependenciesOf" class="def">LoadDependenciesOf</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc"><p>Load only the dependencies of the given module, but not the module itself. </p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:InteractiveImport" class="def">InteractiveImport</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IIDecl" class="def">IIDecl</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)</td><td class="doc"><p>Bring the exports of a particular module (filtered by an import decl) into scope </p></td></tr><tr><td class="src"><a name="v:IIModule" class="def">IIModule</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc"><p>Bring into scope the entire top-level envt of of this module, including the things imported into it. </p></td></tr></table></div><div class="subs instances"><p id="control.i:InteractiveImport" class="caption collapser" onclick="toggleSection('i:InteractiveImport')">Instances</p><div id="section.i:InteractiveImport" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:InteractiveImport">InteractiveImport</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SuccessFlag" class="def">SuccessFlag</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Succeeded" class="def">Succeeded</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Failed" class="def">Failed</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SuccessFlag" class="caption collapser" onclick="toggleSection('i:SuccessFlag')">Instances</p><div id="section.i:SuccessFlag" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:SuccessFlag">SuccessFlag</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:succeeded" class="def">succeeded</a> :: <a href="GHC.html#t:SuccessFlag">SuccessFlag</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:failed" class="def">failed</a> :: <a href="GHC.html#t:SuccessFlag">SuccessFlag</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:defaultWarnErrLogger" class="def">defaultWarnErrLogger</a> :: <a href="GHC.html#t:WarnErrLogger">WarnErrLogger</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:WarnErrLogger" class="def">WarnErrLogger</a> = <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:SourceError">SourceError</a> -> m ()</p><div class="doc"><p>A function called to log warnings and errors. </p></div></div><div class="top"><p class="src"><a name="v:workingDirectoryChanged" class="def">workingDirectoryChanged</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ()</p><div class="doc"><p>Inform GHC that the working directory has changed. GHC will flush its cache of module locations, since it may no longer be valid. </p><p>Note: Before changing the working directory make sure all threads running in the same session have stopped. If you change the working directory, you should also unload the current program (set targets to empty, followed by load). </p></div></div><div class="top"><p class="src"><a name="v:parseModule" class="def">parseModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModSummary">ModSummary</a> -> m <a href="GHC.html#t:ParsedModule">ParsedModule</a></p><div class="doc"><p>Parse a module. </p><p>Throws a <code><a href="HscTypes.html#t:SourceError">SourceError</a></code> on parse error. </p></div></div><div class="top"><p class="src"><a name="v:typecheckModule" class="def">typecheckModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ParsedModule">ParsedModule</a> -> m <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></p><div class="doc"><p>Typecheck and rename a parsed module. </p><p>Throws a <code><a href="HscTypes.html#t:SourceError">SourceError</a></code> if either fails. </p></div></div><div class="top"><p class="src"><a name="v:desugarModule" class="def">desugarModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a> -> m <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></p><div class="doc"><p>Desugar a typechecked module. </p></div></div><div class="top"><p class="src"><a name="v:loadModule" class="def">loadModule</a> :: (<a href="GHC.html#t:TypecheckedMod">TypecheckedMod</a> mod, <a href="GHC.html#t:GhcMonad">GhcMonad</a> m) => mod -> m mod</p><div class="doc"><p>Load a module. Input doesn't need to be desugared. </p><p>A module must be loaded before dependent modules can be typechecked. This always includes generating a <code><a href="GHC.html#t:ModIface">ModIface</a></code> and, depending on the <code><a href="GHC.html#v:hscTarget">hscTarget</a></code>, may also include code generation. </p><p>This function will always cause recompilation and will always overwrite previous compilation results (potentially files on disk). </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ParsedModule" class="def">ParsedModule</a> </p><div class="doc"><p>The result of successful parsing. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ParsedModule" class="def">ParsedModule</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:pm_mod_summary" class="def">pm_mod_summary</a> :: <a href="GHC.html#t:ModSummary">ModSummary</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:pm_parsed_source" class="def">pm_parsed_source</a> :: <a href="GHC.html#t:ParsedSource">ParsedSource</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:pm_extra_src_files" class="def">pm_extra_src_files</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ParsedModule" class="caption collapser" onclick="toggleSection('i:ParsedModule')">Instances</p><div id="section.i:ParsedModule" class="show"><table><tr><td class="src"><a href="GHC.html#t:ParsedMod">ParsedMod</a> <a href="GHC.html#t:ParsedModule">ParsedModule</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TypecheckedModule" class="def">TypecheckedModule</a> </p><div class="doc"><p>The result of successful typechecking. It also contains the parser result. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TypecheckedModule" class="def">TypecheckedModule</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:tm_parsed_module" class="def">tm_parsed_module</a> :: <a href="GHC.html#t:ParsedModule">ParsedModule</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:tm_renamed_source" class="def">tm_renamed_source</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:RenamedSource">RenamedSource</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:tm_typechecked_source" class="def">tm_typechecked_source</a> :: <a href="GHC.html#t:TypecheckedSource">TypecheckedSource</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:tm_checked_module_info" class="def">tm_checked_module_info</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:tm_internals_" class="def">tm_internals_</a> :: (<a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:TypecheckedModule" class="caption collapser" onclick="toggleSection('i:TypecheckedModule')">Instances</p><div id="section.i:TypecheckedModule" class="show"><table><tr><td class="src"><a href="GHC.html#t:TypecheckedMod">TypecheckedMod</a> <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:ParsedMod">ParsedMod</a> <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DesugaredModule" class="def">DesugaredModule</a> </p><div class="doc"><p>The result of successful desugaring (i.e., translation to core). Also contains all the information of a typechecked module. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:DesugaredModule" class="def">DesugaredModule</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:dm_typechecked_module" class="def">dm_typechecked_module</a> :: <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dm_core_module" class="def">dm_core_module</a> :: <a href="HscTypes.html#t:ModGuts">ModGuts</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:DesugaredModule" class="caption collapser" onclick="toggleSection('i:DesugaredModule')">Instances</p><div id="section.i:DesugaredModule" class="show"><table><tr><td class="src">DesugaredMod <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:TypecheckedMod">TypecheckedMod</a> <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:ParsedMod">ParsedMod</a> <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TypecheckedSource" class="def">TypecheckedSource</a> = <a href="HsBinds.html#t:LHsBinds">LHsBinds</a> <a href="GHC.html#t:Id">Id</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ParsedSource" class="def">ParsedSource</a> = <a href="GHC.html#t:Located">Located</a> (<a href="HsSyn.html#t:HsModule">HsModule</a> <a href="GHC.html#t:RdrName">RdrName</a>)</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:RenamedSource" class="def">RenamedSource</a> = (<a href="HsDecls.html#t:HsGroup">HsGroup</a> <a href="GHC.html#t:Name">Name</a>, [<a href="HsImpExp.html#t:LImportDecl">LImportDecl</a> <a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="HsImpExp.html#t:LIE">LIE</a> <a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HsDoc.html#t:LHsDocString">LHsDocString</a>)</p></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="GHC.html#t:ParsedMod">ParsedMod</a> m => <a name="t:TypecheckedMod" class="def">TypecheckedMod</a> m <span class="keyword">where</span></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:renamedSource" class="def">renamedSource</a> :: m -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:RenamedSource">RenamedSource</a></p><p class="src"><a name="v:typecheckedSource" class="def">typecheckedSource</a> :: m -> <a href="GHC.html#t:TypecheckedSource">TypecheckedSource</a></p><p class="src"><a name="v:moduleInfo" class="def">moduleInfo</a> :: m -> <a href="GHC.html#t:ModuleInfo">ModuleInfo</a></p></div><div class="subs instances"><p id="control.i:TypecheckedMod" class="caption collapser" onclick="toggleSection('i:TypecheckedMod')">Instances</p><div id="section.i:TypecheckedMod" class="show"><table><tr><td class="src"><a href="GHC.html#t:TypecheckedMod">TypecheckedMod</a> <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:TypecheckedMod">TypecheckedMod</a> <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:ParsedMod" class="def">ParsedMod</a> m <span class="keyword">where</span></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:parsedSource" class="def">parsedSource</a> :: m -> <a href="GHC.html#t:ParsedSource">ParsedSource</a></p></div><div class="subs instances"><p id="control.i:ParsedMod" class="caption collapser" onclick="toggleSection('i:ParsedMod')">Instances</p><div id="section.i:ParsedMod" class="show"><table><tr><td class="src"><a href="GHC.html#t:ParsedMod">ParsedMod</a> <a href="GHC.html#t:DesugaredModule">DesugaredModule</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:ParsedMod">ParsedMod</a> <a href="GHC.html#t:TypecheckedModule">TypecheckedModule</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:ParsedMod">ParsedMod</a> <a href="GHC.html#t:ParsedModule">ParsedModule</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:coreModule" class="def">coreModule</a> :: DesugaredMod m => m -> <a href="HscTypes.html#t:ModGuts">ModGuts</a></p></div><h2 id="g:6">Compiling to Core </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:CoreModule" class="def">CoreModule</a> </p><div class="doc"><p>A CoreModule consists of just the fields of a <code><a href="HscTypes.html#t:ModGuts">ModGuts</a></code> that are needed for the <code><a href="GHC.html#v:compileToCoreModule">compileToCoreModule</a></code> interface. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CoreModule" class="def">CoreModule</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:cm_module" class="def">cm_module</a> :: !<a href="GHC.html#t:Module">Module</a></dt><dd class="doc"><p>Module name </p></dd><dt class="src"><a name="v:cm_types" class="def">cm_types</a> :: !<a href="HscTypes.html#t:TypeEnv">TypeEnv</a></dt><dd class="doc"><p>Type environment for types declared in this module </p></dd><dt class="src"><a name="v:cm_binds" class="def">cm_binds</a> :: <a href="CoreSyn.html#t:CoreProgram">CoreProgram</a></dt><dd class="doc"><p>Declarations </p></dd><dt class="src"><a name="v:cm_safe" class="def">cm_safe</a> :: <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></dt><dd class="doc"><p>Safe Haskell mode </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:CoreModule" class="caption collapser" onclick="toggleSection('i:CoreModule')">Instances</p><div id="section.i:CoreModule" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:CoreModule">CoreModule</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:compileToCoreModule" class="def">compileToCoreModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="GHC.html#t:CoreModule">CoreModule</a></p><div class="doc"><p>This is the way to get access to the Core bindings corresponding to a module. <code>compileToCore</code> parses, typechecks, and desugars the module, then returns the resulting Core module (consisting of the module name, type declarations, and function declarations) if successful. </p></div></div><div class="top"><p class="src"><a name="v:compileToCoreSimplified" class="def">compileToCoreSimplified</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -> m <a href="GHC.html#t:CoreModule">CoreModule</a></p><div class="doc"><p>Like compileToCoreModule, but invokes the simplifier, so as to return simplified and tidied Core. </p></div></div><div class="top"><p class="src"><a name="v:compileCoreToObj" class="def">compileCoreToObj</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="GHC.html#t:CoreModule">CoreModule</a> -> m ()</p><div class="doc"><p>Takes a CoreModule and compiles the bindings therein to object code. The first argument is a bool flag indicating whether to run the simplifier. The resulting .o, .hi, and executable files, if any, are stored in the current directory, and named according to the module name. This has only so far been tested with a single self-contained module. </p></div></div><h1 id="g:7">Inspecting the module structure of the program </h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ModuleGraph" class="def">ModuleGraph</a> = [<a href="GHC.html#t:ModSummary">ModSummary</a>]</p><div class="doc"><p>A ModuleGraph contains all the nodes from the home package (only). There will be a node for each source module, plus a node for each hi-boot module. </p><p>The graph is not necessarily stored in topologically-sorted order. Use <code><a href="GHC.html#v:topSortModuleGraph">topSortModuleGraph</a></code> and <code><a href="Digraph.html#v:flattenSCC">flattenSCC</a></code> to achieve this. </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModSummary" class="def">ModSummary</a> </p><div class="doc"><p>A single node in a 'ModuleGraph. The nodes of the module graph are one of: </p><ul><li> A regular Haskell source module </li><li> A hi-boot source module </li><li> An external-core source module </li></ul></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModSummary" class="def">ModSummary</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:ms_mod" class="def">ms_mod</a> :: <a href="GHC.html#t:Module">Module</a></dt><dd class="doc"><p>Identity of the module </p></dd><dt class="src"><a name="v:ms_hsc_src" class="def">ms_hsc_src</a> :: <a href="DriverPhases.html#t:HscSource">HscSource</a></dt><dd class="doc"><p>The module source either plain Haskell, hs-boot or external core </p></dd><dt class="src"><a name="v:ms_location" class="def">ms_location</a> :: <a href="GHC.html#t:ModLocation">ModLocation</a></dt><dd class="doc"><p>Location of the various files belonging to the module </p></dd><dt class="src"><a name="v:ms_hs_date" class="def">ms_hs_date</a> :: <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></dt><dd class="doc"><p>Timestamp of source file </p></dd><dt class="src"><a name="v:ms_obj_date" class="def">ms_obj_date</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></dt><dd class="doc"><p>Timestamp of object, if we have one </p></dd><dt class="src"><a name="v:ms_srcimps" class="def">ms_srcimps</a> :: [<a href="GHC.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)]</dt><dd class="doc"><p>Source imports of the module </p></dd><dt class="src"><a name="v:ms_textual_imps" class="def">ms_textual_imps</a> :: [<a href="GHC.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)]</dt><dd class="doc"><p>Non-source imports of the module from the module *text* </p></dd><dt class="src"><a name="v:ms_hspp_file" class="def">ms_hspp_file</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc"><p>Filename of preprocessed source file </p></dd><dt class="src"><a name="v:ms_hspp_opts" class="def">ms_hspp_opts</a> :: <a href="GHC.html#t:DynFlags">DynFlags</a></dt><dd class="doc"><p>Cached flags from <code>OPTIONS</code>, <code>INCLUDE</code> and <code>LANGUAGE</code> pragmas in the modules source code </p></dd><dt class="src"><a name="v:ms_hspp_buf" class="def">ms_hspp_buf</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="StringBuffer.html#t:StringBuffer">StringBuffer</a></dt><dd class="doc"><p>The actual preprocessed source, if we have it </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ModSummary" class="caption collapser" onclick="toggleSection('i:ModSummary')">Instances</p><div id="section.i:ModSummary" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:ModSummary">ModSummary</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:ms_mod_name" class="def">ms_mod_name</a> :: <a href="GHC.html#t:ModSummary">ModSummary</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModLocation" class="def">ModLocation</a> </p><div class="doc"><p>Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModLocation" class="def">ModLocation</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:ml_hs_file" class="def">ml_hs_file</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:ml_hi_file" class="def">ml_hi_file</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:ml_obj_file" class="def">ml_obj_file</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ModLocation" class="caption collapser" onclick="toggleSection('i:ModLocation')">Instances</p><div id="section.i:ModLocation" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:ModLocation">ModLocation</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:ModLocation">ModLocation</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getModSummary" class="def">getModSummary</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> m <a href="GHC.html#t:ModSummary">ModSummary</a></p><div class="doc"><p>Return the <code><a href="GHC.html#t:ModSummary">ModSummary</a></code> of a module with the given name. </p><p>The module must be part of the module graph (see <code><a href="HscTypes.html#v:hsc_mod_graph">hsc_mod_graph</a></code> and <code><a href="GHC.html#t:ModuleGraph">ModuleGraph</a></code>). If this is not the case, this function will throw a <code><a href="HscTypes.html#t:GhcApiError">GhcApiError</a></code>. </p><p>This function ignores boot modules and requires that there is only one non-boot module with the given name. </p></div></div><div class="top"><p class="src"><a name="v:getModuleGraph" class="def">getModuleGraph</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="GHC.html#t:ModuleGraph">ModuleGraph</a></p><div class="doc"><p>Get the module dependency graph. </p></div></div><div class="top"><p class="src"><a name="v:isLoaded" class="def">isLoaded</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Return <code>True</code> <a href="==">==</a> module is loaded. </p></div></div><div class="top"><p class="src"><a name="v:topSortModuleGraph" class="def">topSortModuleGraph</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Drop hi-boot nodes? (see below) </p></td></tr><tr><td class="src">-> [<a href="GHC.html#t:ModSummary">ModSummary</a>]</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc"><p>Root module name. If <code>Nothing</code>, use the full graph. </p></td></tr><tr><td class="src">-> [<a href="Digraph.html#t:SCC">SCC</a> <a href="GHC.html#t:ModSummary">ModSummary</a>]</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Calculate SCCs of the module graph, possibly dropping the hi-boot nodes The resulting list of strongly-connected-components is in topologically sorted order, starting with the module(s) at the bottom of the dependency graph (ie compile them first) and ending with the ones at the top. </p><p>Drop hi-boot nodes (first boolean arg)? </p><ul><li> <code>False</code>: treat the hi-boot summaries as nodes of the graph, so the graph must be acyclic </li><li> <code>True</code>: eliminate the hi-boot nodes, and instead pretend the a source-import of Foo is an import of Foo The resulting graph has no hi-boot nodes, but can be cyclic </li></ul></div></div><h1 id="g:8">Inspecting modules </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModuleInfo" class="def">ModuleInfo</a> </p><div class="doc"><p>Container for information about a <code><a href="GHC.html#t:Module">Module</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:getModuleInfo" class="def">getModuleInfo</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:ModuleInfo">ModuleInfo</a>)</p><div class="doc"><p>Request information about a loaded <code><a href="GHC.html#t:Module">Module</a></code> </p></div></div><div class="top"><p class="src"><a name="v:modInfoTyThings" class="def">modInfoTyThings</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> [<a href="GHC.html#t:TyThing">TyThing</a>]</p><div class="doc"><p>The list of top-level entities defined in a module </p></div></div><div class="top"><p class="src"><a name="v:modInfoTopLevelScope" class="def">modInfoTopLevelScope</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="GHC.html#t:Name">Name</a>]</p></div><div class="top"><p class="src"><a name="v:modInfoExports" class="def">modInfoExports</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> [<a href="GHC.html#t:Name">Name</a>]</p></div><div class="top"><p class="src"><a name="v:modInfoInstances" class="def">modInfoInstances</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> [<a href="GHC.html#t:Instance">Instance</a>]</p><div class="doc"><p>Returns the instances defined by the specified module. Warning: currently unimplemented for package modules. </p></div></div><div class="top"><p class="src"><a name="v:modInfoIsExportedName" class="def">modInfoIsExportedName</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:modInfoLookupName" class="def">modInfoLookupName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:TyThing">TyThing</a>)</p></div><div class="top"><p class="src"><a name="v:modInfoIface" class="def">modInfoIface</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:ModIface">ModIface</a></p></div><div class="top"><p class="src"><a name="v:modInfoSafe" class="def">modInfoSafe</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></p><div class="doc"><p>Retrieve module safe haskell mode </p></div></div><div class="top"><p class="src"><a name="v:lookupGlobalName" class="def">lookupGlobalName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:TyThing">TyThing</a>)</p><div class="doc"><p>Looks up a global name: that is, any top-level name in any visible module. Unlike <code><a href="GHC.html#v:lookupName">lookupName</a></code>, lookupGlobalName does not use the interactive context, and therefore does not require a preceding <code><a href="GHC.html#v:setContext">setContext</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:findGlobalAnns" class="def">findGlobalAnns</a> :: (<a href="GHC.html#t:GhcMonad">GhcMonad</a> m, <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> a) => ([<a href="../base-4.5.1.0/Data-Word.html#t:Word8">Word8</a>] -> a) -> <a href="Annotations.html#t:AnnTarget">AnnTarget</a> <a href="GHC.html#t:Name">Name</a> -> m [a]</p></div><div class="top"><p class="src"><a name="v:mkPrintUnqualifiedForModule" class="def">mkPrintUnqualifiedForModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:PrintUnqualified">PrintUnqualified</a>)</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModIface" class="def">ModIface</a> </p><div class="doc"><p>A <code><a href="GHC.html#t:ModIface">ModIface</a></code> plus a <code><a href="HscTypes.html#t:ModDetails">ModDetails</a></code> summarises everything we know about a compiled module. The <code><a href="GHC.html#t:ModIface">ModIface</a></code> is the stuff *before* linking, and can be written out to an interface file. The 'ModDetails is after linking and can be completely recovered from just the <code><a href="GHC.html#t:ModIface">ModIface</a></code>. </p><p>When we read an interface file, we also construct a <code><a href="GHC.html#t:ModIface">ModIface</a></code> from it, except that we explicitly make the <code><a href="GHC.html#v:mi_decls">mi_decls</a></code> and a few other fields empty; as when reading we consolidate the declarations etc. into a number of indexed maps and environments in the <code><a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a></code>. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModIface" class="def">ModIface</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:mi_module" class="def">mi_module</a> :: !<a href="GHC.html#t:Module">Module</a></dt><dd class="doc"><p>Name of the module we are for </p></dd><dt class="src"><a name="v:mi_iface_hash" class="def">mi_iface_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Hash of the whole interface </p></dd><dt class="src"><a name="v:mi_mod_hash" class="def">mi_mod_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Hash of the ABI only </p></dd><dt class="src"><a name="v:mi_flag_hash" class="def">mi_flag_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Hash of the important flags used when compiling this module </p></dd><dt class="src"><a name="v:mi_orphan" class="def">mi_orphan</a> :: !<a href="HscTypes.html#t:WhetherHasOrphans">WhetherHasOrphans</a></dt><dd class="doc"><p>Whether this module has orphans </p></dd><dt class="src"><a name="v:mi_finsts" class="def">mi_finsts</a> :: !WhetherHasFamInst</dt><dd class="doc"><p>Whether this module has family instances </p></dd><dt class="src"><a name="v:mi_boot" class="def">mi_boot</a> :: !<a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a></dt><dd class="doc"><p>Read from an hi-boot file? </p></dd><dt class="src"><a name="v:mi_deps" class="def">mi_deps</a> :: <a href="HscTypes.html#t:Dependencies">Dependencies</a></dt><dd class="doc"><p>The dependencies of the module. This is consulted for directly-imported modules, but not for anything else (hence lazy) </p></dd><dt class="src"><a name="v:mi_usages" class="def">mi_usages</a> :: [<a href="HscTypes.html#t:Usage">Usage</a>]</dt><dd class="doc"><p>Usages; kept sorted so that it's easy to decide whether to write a new iface file (changing usages doesn't affect the hash of this module) NOT STRICT! we read this field lazily from the interface file It is *only* consulted by the recompilation checker </p></dd><dt class="src"><a name="v:mi_exports" class="def">mi_exports</a> :: ![<a href="HscTypes.html#t:IfaceExport">IfaceExport</a>]</dt><dd class="doc"><p>Exports Kept sorted by (mod,occ), to make version comparisons easier Records the modules that are the declaration points for things exported by this module, and the <code><a href="OccName.html#t:OccName">OccName</a></code>s of those things </p></dd><dt class="src"><a name="v:mi_exp_hash" class="def">mi_exp_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Hash of export list </p></dd><dt class="src"><a name="v:mi_used_th" class="def">mi_used_th</a> :: !<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>Module required TH splices when it was compiled. This disables recompilation avoidance (see #481). </p></dd><dt class="src"><a name="v:mi_fixities" class="def">mi_fixities</a> :: [(<a href="OccName.html#t:OccName">OccName</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>)]</dt><dd class="doc"><p>Fixities NOT STRICT! we read this field lazily from the interface file </p></dd><dt class="src"><a name="v:mi_warns" class="def">mi_warns</a> :: <a href="HscTypes.html#t:Warnings">Warnings</a></dt><dd class="doc"><p>Warnings NOT STRICT! we read this field lazily from the interface file </p></dd><dt class="src"><a name="v:mi_anns" class="def">mi_anns</a> :: [<a href="IfaceSyn.html#t:IfaceAnnotation">IfaceAnnotation</a>]</dt><dd class="doc"><p>Annotations NOT STRICT! we read this field lazily from the interface file </p></dd><dt class="src"><a name="v:mi_decls" class="def">mi_decls</a> :: [(<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>, <a href="IfaceSyn.html#t:IfaceDecl">IfaceDecl</a>)]</dt><dd class="doc"><p>Type, class and variable declarations The hash of an Id changes if its fixity or deprecations change (as well as its type of course) Ditto data constructors, class operations, except that the hash of the parent class/tycon changes </p></dd><dt class="src"><a name="v:mi_globals" class="def">mi_globals</a> :: !(<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a>)</dt><dd class="doc"><p>Binds all the things defined at the top level in the <em>original source</em> code for this module. which is NOT the same as mi_exports, nor mi_decls (which may contains declarations for things not actually defined by the user). Used for GHCi and for inspecting the contents of modules via the GHC API only. </p><p>(We need the source file to figure out the top-level environment, if we didn't compile this module from source then this field contains <code>Nothing</code>). </p><p>Strictly speaking this field should live in the <code><a href="HscTypes.html#t:HomeModInfo">HomeModInfo</a></code>, but that leads to more plumbing. </p></dd><dt class="src"><a name="v:mi_insts" class="def">mi_insts</a> :: [<a href="IfaceSyn.html#t:IfaceInst">IfaceInst</a>]</dt><dd class="doc"><p>Sorted class instance </p></dd><dt class="src"><a name="v:mi_fam_insts" class="def">mi_fam_insts</a> :: [<a href="IfaceSyn.html#t:IfaceFamInst">IfaceFamInst</a>]</dt><dd class="doc"><p>Sorted family instances </p></dd><dt class="src"><a name="v:mi_rules" class="def">mi_rules</a> :: [<a href="IfaceSyn.html#t:IfaceRule">IfaceRule</a>]</dt><dd class="doc"><p>Sorted rules </p></dd><dt class="src"><a name="v:mi_orphan_hash" class="def">mi_orphan_hash</a> :: !<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Hash for orphan rules, class and family instances, and vectorise pragmas combined </p></dd><dt class="src"><a name="v:mi_vect_info" class="def">mi_vect_info</a> :: !<a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</a></dt><dd class="doc"><p>Vectorisation information </p></dd><dt class="src"><a name="v:mi_warn_fn" class="def">mi_warn_fn</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="BasicTypes.html#t:WarningTxt">WarningTxt</a></dt><dd class="doc"><p>Cached lookup for <code><a href="GHC.html#v:mi_warns">mi_warns</a></code> </p></dd><dt class="src"><a name="v:mi_fix_fn" class="def">mi_fix_fn</a> :: <a href="OccName.html#t:OccName">OccName</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a></dt><dd class="doc"><p>Cached lookup for <code><a href="GHC.html#v:mi_fixities">mi_fixities</a></code> </p></dd><dt class="src"><a name="v:mi_hash_fn" class="def">mi_hash_fn</a> :: <a href="OccName.html#t:OccName">OccName</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="OccName.html#t:OccName">OccName</a>, <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>)</dt><dd class="doc"><p>Cached lookup for <code><a href="GHC.html#v:mi_decls">mi_decls</a></code>. The <code>Nothing</code> in <code><a href="GHC.html#v:mi_hash_fn">mi_hash_fn</a></code> means that the thing isn't in decls. It's useful to know that when seeing if we are up to date wrt. the old interface. The <code><a href="OccName.html#t:OccName">OccName</a></code> is the parent of the name, if it has one. </p></dd><dt class="src"><a name="v:mi_hpc" class="def">mi_hpc</a> :: !<a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a></dt><dd class="doc"><p>True if this program uses Hpc at any point in the program. </p></dd><dt class="src"><a name="v:mi_trust" class="def">mi_trust</a> :: !<a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></dt><dd class="doc"><p>Safe Haskell Trust information for this module. </p></dd><dt class="src"><a name="v:mi_trust_pkg" class="def">mi_trust_pkg</a> :: !<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>Do we require the package this module resides in be trusted to trust this module? This is used for the situation where a module is Safe (so doesn't require the package be trusted itself) but imports some trustworthy modules from its own package (which does require its own package be trusted). See Note [RnNames . Trust Own Package] </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ModIface" class="caption collapser" onclick="toggleSection('i:ModIface')">Instances</p><div id="section.i:ModIface" class="show"><table><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="GHC.html#t:ModIface">ModIface</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SafeHaskellMode" class="def">SafeHaskellMode</a> </p><div class="doc"><p>The various Safe Haskell modes </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Sf_None" class="def">Sf_None</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Sf_Unsafe" class="def">Sf_Unsafe</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Sf_Trustworthy" class="def">Sf_Trustworthy</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Sf_Safe" class="def">Sf_Safe</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Sf_SafeInfered" class="def">Sf_SafeInfered</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SafeHaskellMode" class="caption collapser" onclick="toggleSection('i:SafeHaskellMode')">Instances</p><div id="section.i:SafeHaskellMode" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:SafeHaskellMode">SafeHaskellMode</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:9">Querying the environment </h1><div class="top"><p class="src"><a name="v:packageDbModules" class="def">packageDbModules</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Only consider exposed packages. </p></td></tr><tr><td class="src">-> m [<a href="GHC.html#t:Module">Module</a>]</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Return all <em>external</em> modules available in the package database. Modules from the current session (i.e., from the <code><a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></code>) are not included. </p></div></div><h1 id="g:10">Printing </h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PrintUnqualified" class="def">PrintUnqualified</a> = (QueryQualifyName, QueryQualifyModule)</p></div><div class="top"><p class="src"><a name="v:alwaysQualify" class="def">alwaysQualify</a> :: <a href="GHC.html#t:PrintUnqualified">PrintUnqualified</a></p></div><h1 id="g:11">Interactive evaluation </h1><div class="top"><p class="src"><a name="v:getBindings" class="def">getBindings</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:TyThing">TyThing</a>]</p><div class="doc"><p>Return the bindings for the current interactive session. </p></div></div><div class="top"><p class="src"><a name="v:getInsts" class="def">getInsts</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ([<a href="GHC.html#t:Instance">Instance</a>], [<a href="FamInstEnv.html#t:FamInst">FamInst</a>])</p><div class="doc"><p>Return the instances for the current interactive session. </p></div></div><div class="top"><p class="src"><a name="v:getPrintUnqual" class="def">getPrintUnqual</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="GHC.html#t:PrintUnqualified">PrintUnqualified</a></p></div><div class="top"><p class="src"><a name="v:findModule" class="def">findModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="FastString.html#t:FastString">FastString</a> -> m <a href="GHC.html#t:Module">Module</a></p><div class="doc"><p>Takes a <code><a href="GHC.html#t:ModuleName">ModuleName</a></code> and possibly a <code><a href="GHC.html#t:PackageId">PackageId</a></code>, and consults the filesystem and package database to find the corresponding <code><a href="GHC.html#t:Module">Module</a></code>, using the algorithm that is used for an <code>import</code> declaration. </p></div></div><div class="top"><p class="src"><a name="v:lookupModule" class="def">lookupModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="FastString.html#t:FastString">FastString</a> -> m <a href="GHC.html#t:Module">Module</a></p><div class="doc"><p>Like <code><a href="GHC.html#v:findModule">findModule</a></code>, but differs slightly when the module refers to a source file, and the file has not been loaded via <code><a href="GHC.html#v:load">load</a></code>. In this case, <code><a href="GHC.html#v:findModule">findModule</a></code> will throw an error (module not loaded), but <code><a href="GHC.html#v:lookupModule">lookupModule</a></code> will check to see whether the module can also be found in a package, and if so, that package <code><a href="GHC.html#t:Module">Module</a></code> will be returned. If not, the usual module-not-found error will be thrown. </p></div></div><div class="top"><p class="src"><a name="v:setContext" class="def">setContext</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => [<a href="GHC.html#t:InteractiveImport">InteractiveImport</a>] -> m ()</p><div class="doc"><p>Set the interactive evaluation context. </p><p>Setting the context doesn't throw away any bindings; the bindings we've built up in the InteractiveContext simply move to the new module. They always shadow anything in scope in the current context. </p></div></div><div class="top"><p class="src"><a name="v:getContext" class="def">getContext</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:InteractiveImport">InteractiveImport</a>]</p><div class="doc"><p>Get the interactive evaluation context, consisting of a pair of the set of modules from which we take the full top-level scope, and the set of modules from which we take just the exports respectively. </p></div></div><div class="top"><p class="src"><a name="v:getNamesInScope" class="def">getNamesInScope</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:Name">Name</a>]</p><div class="doc"><p>Returns all names in scope in the current interactive context </p></div></div><div class="top"><p class="src"><a name="v:getRdrNamesInScope" class="def">getRdrNamesInScope</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:RdrName">RdrName</a>]</p></div><div class="top"><p class="src"><a name="v:getGRE" class="def">getGRE</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></p><div class="doc"><p>get the GlobalRdrEnv for a session </p></div></div><div class="top"><p class="src"><a name="v:moduleIsInterpreted" class="def">moduleIsInterpreted</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Returns <code>True</code> if the specified module is interpreted, and hence has its full top-level scope available. </p></div></div><div class="top"><p class="src"><a name="v:getInfo" class="def">getInfo</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="GHC.html#t:TyThing">TyThing</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>, [<a href="GHC.html#t:Instance">Instance</a>]))</p><div class="doc"><p>Looks up an identifier in the current interactive context (for :info) Filter the instances by the ones whose tycons (or clases resp) are in scope (qualified or otherwise). Otherwise we list a whole lot too many! The exact choice of which ones to show, and which to hide, is a judgement call. (see Trac #1581) </p></div></div><div class="top"><p class="src"><a name="v:exprType" class="def">exprType</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m <a href="GHC.html#t:Type">Type</a></p><div class="doc"><p>Get the type of an expression </p></div></div><div class="top"><p class="src"><a name="v:typeKind" class="def">typeKind</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m (<a href="GHC.html#t:Type">Type</a>, <a href="GHC.html#t:Kind">Kind</a>)</p><div class="doc"><p>Get the kind of a type </p></div></div><div class="top"><p class="src"><a name="v:parseName" class="def">parseName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m [<a href="GHC.html#t:Name">Name</a>]</p><div class="doc"><p>Parses a string as an identifier, and returns the list of <code><a href="GHC.html#t:Name">Name</a></code>s that the identifier can refer to in the current interactive context. </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:RunResult" class="def">RunResult</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RunOk" class="def">RunOk</a> [<a href="GHC.html#t:Name">Name</a>]</td><td class="doc"><p>names bound by this evaluation </p></td></tr><tr><td class="src"><a name="v:RunException" class="def">RunException</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a></td><td class="doc"><p>statement raised an exception </p></td></tr><tr><td class="src"><a name="v:RunBreak" class="def">RunBreak</a> <a href="../base-4.5.1.0/Control-Concurrent.html#t:ThreadId">ThreadId</a> [<a href="GHC.html#t:Name">Name</a>] (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:BreakInfo">BreakInfo</a>)</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:runStmt" class="def">runStmt</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:SingleStep">SingleStep</a> -> m <a href="GHC.html#t:RunResult">RunResult</a></p><div class="doc"><p>Run a statement in the current interactive context. Statement may bind multple values. </p></div></div><div class="top"><p class="src"><a name="v:runStmtWithLocation" class="def">runStmtWithLocation</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:SingleStep">SingleStep</a> -> m <a href="GHC.html#t:RunResult">RunResult</a></p><div class="doc"><p>Run a statement in the current interactive context. Passing debug information Statement may bind multple values. </p></div></div><div class="top"><p class="src"><a name="v:runDecls" class="def">runDecls</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m [<a href="GHC.html#t:Name">Name</a>]</p></div><div class="top"><p class="src"><a name="v:runDeclsWithLocation" class="def">runDeclsWithLocation</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m [<a href="GHC.html#t:Name">Name</a>]</p></div><div class="top"><p class="src"><a name="v:parseImportDecl" class="def">parseImportDecl</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="GHC.html#t:RdrName">RdrName</a>)</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SingleStep" class="def">SingleStep</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RunToCompletion" class="def">RunToCompletion</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SingleStep" class="def">SingleStep</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:RunAndLogSteps" class="def">RunAndLogSteps</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:resume" class="def">resume</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => (<a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="GHC.html#t:SingleStep">SingleStep</a> -> m <a href="GHC.html#t:RunResult">RunResult</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Resume" class="def">Resume</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:History" class="def">History</a> </p></div><div class="top"><p class="src"><a name="v:getHistorySpan" class="def">getHistorySpan</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:History">History</a> -> m <a href="GHC.html#t:SrcSpan">SrcSpan</a></p></div><div class="top"><p class="src"><a name="v:getHistoryModule" class="def">getHistoryModule</a> :: <a href="GHC.html#t:History">History</a> -> <a href="GHC.html#t:Module">Module</a></p></div><div class="top"><p class="src"><a name="v:getResumeContext" class="def">getResumeContext</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m [<a href="GHC.html#t:Resume">Resume</a>]</p></div><div class="top"><p class="src"><a name="v:abandon" class="def">abandon</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:abandonAll" class="def">abandonAll</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:back" class="def">back</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ([<a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="GHC.html#t:SrcSpan">SrcSpan</a>)</p></div><div class="top"><p class="src"><a name="v:forward" class="def">forward</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => m ([<a href="GHC.html#t:Name">Name</a>], <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="GHC.html#t:SrcSpan">SrcSpan</a>)</p></div><div class="top"><p class="src"><a name="v:showModule" class="def">showModule</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModSummary">ModSummary</a> -> m <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p></div><div class="top"><p class="src"><a name="v:isModuleInterpreted" class="def">isModuleInterpreted</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:ModSummary">ModSummary</a> -> m <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:compileExpr" class="def">compileExpr</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m <a href="GHC.html#t:HValue">HValue</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HValue" class="def">HValue</a> </p></div><div class="top"><p class="src"><a name="v:dynCompileExpr" class="def">dynCompileExpr</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> m <a href="../base-4.5.1.0/Data-Dynamic.html#t:Dynamic">Dynamic</a></p></div><div class="top"><p class="src"><a name="v:obtainTermFromId" class="def">obtainTermFromId</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="GHC.html#t:Id">Id</a> -> m <a href="RtClosureInspect.html#t:Term">Term</a></p></div><div class="top"><p class="src"><a name="v:obtainTermFromVal" class="def">obtainTermFromVal</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="GHC.html#t:Type">Type</a> -> a -> m <a href="RtClosureInspect.html#t:Term">Term</a></p></div><div class="top"><p class="src"><a name="v:reconstructType" class="def">reconstructType</a> :: <a href="GHC.html#t:HscEnv">HscEnv</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Type">Type</a>)</p></div><div class="top"><p class="src"><a name="v:modInfoModBreaks" class="def">modInfoModBreaks</a> :: <a href="GHC.html#t:ModuleInfo">ModuleInfo</a> -> <a href="GHC.html#t:ModBreaks">ModBreaks</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModBreaks" class="def">ModBreaks</a> </p><div class="doc"><p>All the information about the breakpoints for a given module </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModBreaks" class="def">ModBreaks</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:modBreaks_flags" class="def">modBreaks_flags</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a></dt><dd class="doc"><p>The array of flags, one per breakpoint, indicating which breakpoints are enabled. </p></dd><dt class="src"><a name="v:modBreaks_locs" class="def">modBreaks_locs</a> :: !(<a href="../array-0.4.0.0/Data-Array.html#t:Array">Array</a> <a href="GHC.html#t:BreakIndex">BreakIndex</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a>)</dt><dd class="doc"><p>An array giving the source span of each breakpoint. </p></dd><dt class="src"><a name="v:modBreaks_vars" class="def">modBreaks_vars</a> :: !(<a href="../array-0.4.0.0/Data-Array.html#t:Array">Array</a> <a href="GHC.html#t:BreakIndex">BreakIndex</a> [<a href="OccName.html#t:OccName">OccName</a>])</dt><dd class="doc"><p>An array giving the names of the free variables at each breakpoint. </p></dd><dt class="src"><a name="v:modBreaks_decls" class="def">modBreaks_decls</a> :: !(<a href="../array-0.4.0.0/Data-Array.html#t:Array">Array</a> <a href="GHC.html#t:BreakIndex">BreakIndex</a> [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>])</dt><dd class="doc"><p>An array giving the names of the declarations enclosing each breakpoint. </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:BreakIndex" class="def">BreakIndex</a> = <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Breakpoint index </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BreakInfo" class="def">BreakInfo</a> </p><div class="subs instances"><p id="control.i:BreakInfo" class="caption collapser" onclick="toggleSection('i:BreakInfo')">Instances</p><div id="section.i:BreakInfo" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:BreakInfo">BreakInfo</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BreakArray" class="def">BreakArray</a> </p></div><div class="top"><p class="src"><a name="v:setBreakOn" class="def">setBreakOn</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:setBreakOff" class="def">setBreakOff</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:getBreak" class="def">getBreak</a> :: <a href="GHC.html#t:BreakArray">BreakArray</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/Data-Word.html#t:Word">Word</a>)</p></div><div class="top"><p class="src"><a name="v:lookupName" class="def">lookupName</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Name">Name</a> -> m (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:TyThing">TyThing</a>)</p><div class="doc"><p>Returns the <code><a href="GHC.html#t:TyThing">TyThing</a></code> for a <code><a href="GHC.html#t:Name">Name</a></code>. The <code><a href="GHC.html#t:Name">Name</a></code> may refer to any entity known to GHC, including <code><a href="GHC.html#t:Name">Name</a></code>s defined using <code><a href="GHC.html#v:runStmt">runStmt</a></code>. </p></div></div><h1 id="g:12">Abstract syntax elements </h1><h2 id="g:13">Packages </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PackageId" class="def">PackageId</a> </p><div class="doc"><p>Essentially just a string identifying a package, including the version: e.g. parsec-1.0 </p></div><div class="subs instances"><p id="control.i:PackageId" class="caption collapser" onclick="toggleSection('i:PackageId')">Instances</p><div id="section.i:PackageId" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="GHC.html#t:PackageId">PackageId</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:14">Modules </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Module" class="def">Module</a> </p><div class="doc"><p>A Module is a pair of a <code><a href="GHC.html#t:PackageId">PackageId</a></code> and a <code><a href="GHC.html#t:ModuleName">ModuleName</a></code>. </p></div><div class="subs instances"><p id="control.i:Module" class="caption collapser" onclick="toggleSection('i:Module')">Instances</p><div id="section.i:Module" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="GHC.html#t:Module">Module</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkModule" class="def">mkModule</a> :: <a href="GHC.html#t:PackageId">PackageId</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="GHC.html#t:Module">Module</a></p></div><div class="top"><p class="src"><a name="v:pprModule" class="def">pprModule</a> :: <a href="GHC.html#t:Module">Module</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:moduleName" class="def">moduleName</a> :: <a href="GHC.html#t:Module">Module</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a></p></div><div class="top"><p class="src"><a name="v:modulePackageId" class="def">modulePackageId</a> :: <a href="GHC.html#t:Module">Module</a> -> <a href="GHC.html#t:PackageId">PackageId</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModuleName" class="def">ModuleName</a> </p><div class="doc"><p>A ModuleName is essentially a simple string, e.g. <code>Data.List</code>. </p></div><div class="subs instances"><p id="control.i:ModuleName" class="caption collapser" onclick="toggleSection('i:ModuleName')">Instances</p><div id="section.i:ModuleName" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="GHC.html#t:ModuleName">ModuleName</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkModuleName" class="def">mkModuleName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="GHC.html#t:ModuleName">ModuleName</a></p></div><div class="top"><p class="src"><a name="v:moduleNameString" class="def">moduleNameString</a> :: <a href="GHC.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p></div><h2 id="g:15">Names </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Name" class="def">Name</a> </p><div class="doc"><p>A unique, unambigious name for something, containing information about where that thing originated. </p></div><div class="subs instances"><p id="control.i:Name" class="caption collapser" onclick="toggleSection('i:Name')">Instances</p><div id="section.i:Name" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:OutputableBndr">OutputableBndr</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:isExternalName" class="def">isExternalName</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:nameModule" class="def">nameModule</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="GHC.html#t:Module">Module</a></p></div><div class="top"><p class="src"><a name="v:pprParenSymName" class="def">pprParenSymName</a> :: <a href="GHC.html#t:NamedThing">NamedThing</a> a => a -> <a href="Outputable.html#t:SDoc">SDoc</a></p><div class="doc"><p>print a <code><a href="GHC.html#t:NamedThing">NamedThing</a></code>, adding parentheses if the name is an operator. </p></div></div><div class="top"><p class="src"><a name="v:nameSrcSpan" class="def">nameSrcSpan</a> :: <a href="GHC.html#t:Name">Name</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:NamedThing" class="def">NamedThing</a> a <span class="keyword">where</span></p><div class="doc"><p>A class allowing convenient access to the <code><a href="GHC.html#t:Name">Name</a></code> of various datatypes </p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:getOccName" class="def">getOccName</a> :: a -> <a href="OccName.html#t:OccName">OccName</a></p><p class="src"><a name="v:getName" class="def">getName</a> :: a -> <a href="GHC.html#t:Name">Name</a></p></div><div class="subs instances"><p id="control.i:NamedThing" class="caption collapser" onclick="toggleSection('i:NamedThing')">Instances</p><div id="section.i:NamedThing" class="show"><table><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:Name">Name</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="Var.html#t:Var">Var</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="TyCon.html#t:CoAxiom">CoAxiom</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:Instance">Instance</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="FamInstEnv.html#t:FamInst">FamInst</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:RdrName" class="def">RdrName</a> </p><div class="doc"><p>Do not use the data constructors of RdrName directly: prefer the family of functions that creates them, such as <code><a href="RdrName.html#v:mkRdrUnqual">mkRdrUnqual</a></code> </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Unqual" class="def">Unqual</a> <a href="OccName.html#t:OccName">OccName</a></td><td class="doc"><p>Used for ordinary, unqualified occurrences, e.g. <code>x</code>, <code>y</code> or <code>Foo</code>. Create such a <code><a href="GHC.html#t:RdrName">RdrName</a></code> with <code><a href="RdrName.html#v:mkRdrUnqual">mkRdrUnqual</a></code> </p></td></tr><tr><td class="src"><a name="v:Qual" class="def">Qual</a> <a href="GHC.html#t:ModuleName">ModuleName</a> <a href="OccName.html#t:OccName">OccName</a></td><td class="doc"><p>A qualified name written by the user in <em>source</em> code. The module isn't necessarily the module where the thing is defined; just the one from which it is imported. Examples are <code>Bar.x</code>, <code>Bar.y</code> or <code>Bar.Foo</code>. Create such a <code><a href="GHC.html#t:RdrName">RdrName</a></code> with <code><a href="RdrName.html#v:mkRdrQual">mkRdrQual</a></code> </p></td></tr></table></div><div class="subs instances"><p id="control.i:RdrName" class="caption collapser" onclick="toggleSection('i:RdrName')">Instances</p><div id="section.i:RdrName" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:RdrName">RdrName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:RdrName">RdrName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:RdrName">RdrName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:RdrName">RdrName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:OutputableBndr">OutputableBndr</a> <a href="GHC.html#t:RdrName">RdrName</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:RdrName">RdrName</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:16">Identifiers </h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Id" class="def">Id</a> = <a href="Var.html#t:Var">Var</a></p></div><div class="top"><p class="src"><a name="v:idType" class="def">idType</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="GHC.html#t:Kind">Kind</a></p></div><div class="top"><p class="src"><a name="v:isImplicitId" class="def">isImplicitId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p><code><a href="GHC.html#v:isImplicitId">isImplicitId</a></code> tells whether an <code><a href="GHC.html#t:Id">Id</a></code>s info is implied by other declarations, so we don't need to put its signature in an interface file, even if it's mentioned in some other interface unfolding. </p></div></div><div class="top"><p class="src"><a name="v:isDeadBinder" class="def">isDeadBinder</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isExportedId" class="def">isExportedId</a> :: <a href="Var.html#t:Var">Var</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p><code>isExportedIdVar</code> means "don't throw this away" </p></div></div><div class="top"><p class="src"><a name="v:isLocalId" class="def">isLocalId</a> :: <a href="Var.html#t:Var">Var</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isGlobalId" class="def">isGlobalId</a> :: <a href="Var.html#t:Var">Var</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isRecordSelector" class="def">isRecordSelector</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isPrimOpId" class="def">isPrimOpId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isFCallId" class="def">isFCallId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isClassOpId_maybe" class="def">isClassOpId_maybe</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Class">Class</a></p></div><div class="top"><p class="src"><a name="v:isDataConWorkId" class="def">isDataConWorkId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:idDataCon" class="def">idDataCon</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="GHC.html#t:DataCon">DataCon</a></p><div class="doc"><p>Get from either the worker or the wrapper <code><a href="GHC.html#t:Id">Id</a></code> to the <code><a href="GHC.html#t:DataCon">DataCon</a></code>. Currently used only in the desugarer. </p><p>INVARIANT: <code>idDataCon (dataConWrapId d) = d</code>: remember, <code><a href="DataCon.html#v:dataConWrapId">dataConWrapId</a></code> can return either the wrapper or the worker </p></div></div><div class="top"><p class="src"><a name="v:isBottomingId" class="def">isBottomingId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Returns true if an application to n args would diverge </p></div></div><div class="top"><p class="src"><a name="v:isDictonaryId" class="def">isDictonaryId</a> :: <a href="GHC.html#t:Id">Id</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:recordSelectorFieldLabel" class="def">recordSelectorFieldLabel</a> :: <a href="GHC.html#t:Id">Id</a> -> (<a href="GHC.html#t:TyCon">TyCon</a>, <a href="TyCon.html#t:FieldLabel">FieldLabel</a>)</p><div class="doc"><p>If the <code><a href="GHC.html#t:Id">Id</a></code> is that for a record selector, extract the <code><a href="IdInfo.html#v:sel_tycon">sel_tycon</a></code> and label. Panic otherwise </p></div></div><h2 id="g:17">Type constructors </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TyCon" class="def">TyCon</a> </p><div class="doc"><p>TyCons represent type constructors. Type constructors are introduced by things such as: </p><p>1) Data declarations: <code>data Foo = ...</code> creates the <code>Foo</code> type constructor of kind <code>*</code> </p><p>2) Type synonyms: <code>type Foo = ...</code> creates the <code>Foo</code> type constructor </p><p>3) Newtypes: <code>newtype Foo a = MkFoo ...</code> creates the <code>Foo</code> type constructor of kind <code>* -> *</code> </p><p>4) Class declarations: <code>class Foo where</code> creates the <code>Foo</code> type constructor of kind <code>*</code> </p><p>This data type also encodes a number of primitive, built in type constructors such as those for function and tuple types. </p></div><div class="subs instances"><p id="control.i:TyCon" class="caption collapser" onclick="toggleSection('i:TyCon')">Instances</p><div id="section.i:TyCon" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:tyConTyVars" class="def">tyConTyVars</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> [<a href="GHC.html#t:TyVar">TyVar</a>]</p><div class="doc"><p>The kind and type variables used in the type constructor. Invariant: length tyvars = arity Precisely, this list scopes over: </p><ol><li> The <code>algTcStupidTheta</code> 2. The cached types in 'algTyConRhs.NewTyCon' 3. The family instance types if present </li></ol><p>Note that it does <em>not</em> scope over the data constructors. </p></div></div><div class="top"><p class="src"><a name="v:tyConDataCons" class="def">tyConDataCons</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> [<a href="GHC.html#t:DataCon">DataCon</a>]</p><div class="doc"><p>As <code><a href="TyCon.html#v:tyConDataCons_maybe">tyConDataCons_maybe</a></code>, but returns the empty list of constructors if no constructors could be found </p></div></div><div class="top"><p class="src"><a name="v:tyConArity" class="def">tyConArity</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="BasicTypes.html#t:Arity">Arity</a></p><div class="doc"><p>n if ty_con :: * -> ... -> * n times </p></div></div><div class="top"><p class="src"><a name="v:isClassTyCon" class="def">isClassTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this <code><a href="GHC.html#t:TyCon">TyCon</a></code> that for a class instance? </p></div></div><div class="top"><p class="src"><a name="v:isSynTyCon" class="def">isSynTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this a <code><a href="GHC.html#t:TyCon">TyCon</a></code> representing a type synonym (<code>type</code>)? </p></div></div><div class="top"><p class="src"><a name="v:isNewTyCon" class="def">isNewTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this <code><a href="GHC.html#t:TyCon">TyCon</a></code> that for a <code>newtype</code> </p></div></div><div class="top"><p class="src"><a name="v:isPrimTyCon" class="def">isPrimTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Does this <code><a href="GHC.html#t:TyCon">TyCon</a></code> represent something that cannot be defined in Haskell? </p></div></div><div class="top"><p class="src"><a name="v:isFunTyCon" class="def">isFunTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:isFamilyTyCon" class="def">isFamilyTyCon</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this a <code><a href="GHC.html#t:TyCon">TyCon</a></code>, synonym or otherwise, that may have further instances appear? </p></div></div><div class="top"><p class="src"><a name="v:tyConClass_maybe" class="def">tyConClass_maybe</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="GHC.html#t:Class">Class</a></p><div class="doc"><p>If this <code><a href="GHC.html#t:TyCon">TyCon</a></code> is that for a class instance, return the class it is for. Otherwise returns <code>Nothing</code> </p></div></div><div class="top"><p class="src"><a name="v:synTyConDefn" class="def">synTyConDefn</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], <a href="GHC.html#t:Type">Type</a>)</p><div class="doc"><p>Extract the <code><a href="GHC.html#t:TyVar">TyVar</a></code>s bound by a type synonym and the corresponding (unsubstituted) right hand side. If the given <code><a href="GHC.html#t:TyCon">TyCon</a></code> is not a type synonym, panics </p></div></div><div class="top"><p class="src"><a name="v:synTyConType" class="def">synTyConType</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="GHC.html#t:Type">Type</a></p><div class="doc"><p>Find the expansion of the type synonym represented by the given <code><a href="GHC.html#t:TyCon">TyCon</a></code>. The free variables of this type will typically include those <code><a href="GHC.html#t:TyVar">TyVar</a></code>s bound by the <code><a href="GHC.html#t:TyCon">TyCon</a></code>. Panics if the <code><a href="GHC.html#t:TyCon">TyCon</a></code> is not that of a type synonym </p></div></div><div class="top"><p class="src"><a name="v:synTyConResKind" class="def">synTyConResKind</a> :: <a href="GHC.html#t:TyCon">TyCon</a> -> <a href="GHC.html#t:Kind">Kind</a></p><div class="doc"><p>Find the result <code><a href="GHC.html#t:Kind">Kind</a></code> of a type synonym, after applying it to its <code>arity</code> number of type variables Actually this function works fine on data types too, but they'd always return <code><a href="../base-4.5.1.0/Prelude.html#v:-42-">*</a></code>, so we never need to ask </p></div></div><h2 id="g:18">Type variables </h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TyVar" class="def">TyVar</a> = <a href="Var.html#t:Var">Var</a></p></div><div class="top"><p class="src"><a name="v:alphaTyVars" class="def">alphaTyVars</a> :: [<a href="GHC.html#t:TyVar">TyVar</a>]</p></div><h2 id="g:19">Data constructors </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DataCon" class="def">DataCon</a> </p><div class="doc"><p>A data constructor </p></div><div class="subs instances"><p id="control.i:DataCon" class="caption collapser" onclick="toggleSection('i:DataCon')">Instances</p><div id="section.i:DataCon" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:dataConSig" class="def">dataConSig</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], <a href="GHC.html#t:ThetaType">ThetaType</a>, [<a href="GHC.html#t:Type">Type</a>], <a href="GHC.html#t:Type">Type</a>)</p><div class="doc"><p>The "signature" of the <code><a href="GHC.html#t:DataCon">DataCon</a></code> returns, in order: </p><p>1) The result of <code><a href="DataCon.html#v:dataConAllTyVars">dataConAllTyVars</a></code>, </p><p>2) All the <code><a href="GHC.html#t:ThetaType">ThetaType</a></code>s relating to the <code><a href="GHC.html#t:DataCon">DataCon</a></code> (coercion, dictionary, implicit parameter - whatever) </p><p>3) The type arguments to the constructor </p><p>4) The <em>original</em> result type of the <code><a href="GHC.html#t:DataCon">DataCon</a></code> </p></div></div><div class="top"><p class="src"><a name="v:dataConType" class="def">dataConType</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="GHC.html#t:Type">Type</a></p></div><div class="top"><p class="src"><a name="v:dataConTyCon" class="def">dataConTyCon</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="GHC.html#t:TyCon">TyCon</a></p><div class="doc"><p>The type constructor that we are building via this data constructor </p></div></div><div class="top"><p class="src"><a name="v:dataConFieldLabels" class="def">dataConFieldLabels</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> [<a href="TyCon.html#t:FieldLabel">FieldLabel</a>]</p><div class="doc"><p>The labels for the fields of this particular <code><a href="GHC.html#t:DataCon">DataCon</a></code> </p></div></div><div class="top"><p class="src"><a name="v:dataConIsInfix" class="def">dataConIsInfix</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Should the <code><a href="GHC.html#t:DataCon">DataCon</a></code> be presented infix? </p></div></div><div class="top"><p class="src"><a name="v:isVanillaDataCon" class="def">isVanillaDataCon</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Vanilla <code><a href="GHC.html#t:DataCon">DataCon</a></code>s are those that are nice boring Haskell 98 constructors </p></div></div><div class="top"><p class="src"><a name="v:dataConUserType" class="def">dataConUserType</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> <a href="GHC.html#t:Type">Type</a></p><div class="doc"><p>The user-declared type of the data constructor in the nice-to-read form: </p><pre> T :: forall a b. a -> b -> T [a] </pre><p>rather than: </p><pre> T :: forall a c. forall b. (c~[a]) => a -> b -> T c </pre><p>NB: If the constructor is part of a data instance, the result type mentions the family tycon, not the internal one. </p></div></div><div class="top"><p class="src"><a name="v:dataConStrictMarks" class="def">dataConStrictMarks</a> :: <a href="GHC.html#t:DataCon">DataCon</a> -> [<a href="BasicTypes.html#t:HsBang">HsBang</a>]</p><div class="doc"><p>The strictness markings decided on by the compiler. Does not include those for existential dictionaries. The list is in one-to-one correspondence with the arity of the <code><a href="GHC.html#t:DataCon">DataCon</a></code> </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:StrictnessMark" class="def">StrictnessMark</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:MarkedStrict" class="def">MarkedStrict</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:NotMarkedStrict" class="def">NotMarkedStrict</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:StrictnessMark" class="caption collapser" onclick="toggleSection('i:StrictnessMark')">Instances</p><div id="section.i:StrictnessMark" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:StrictnessMark">StrictnessMark</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:isMarkedStrict" class="def">isMarkedStrict</a> :: <a href="GHC.html#t:StrictnessMark">StrictnessMark</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><h2 id="g:20">Classes </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Class" class="def">Class</a> </p><div class="subs instances"><p id="control.i:Class" class="caption collapser" onclick="toggleSection('i:Class')">Instances</p><div id="section.i:Class" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Unique.html#t:Uniquable">Uniquable</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:Class">Class</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:classMethods" class="def">classMethods</a> :: <a href="GHC.html#t:Class">Class</a> -> [<a href="GHC.html#t:Id">Id</a>]</p></div><div class="top"><p class="src"><a name="v:classSCTheta" class="def">classSCTheta</a> :: <a href="GHC.html#t:Class">Class</a> -> [<a href="GHC.html#t:PredType">PredType</a>]</p></div><div class="top"><p class="src"><a name="v:classTvsFds" class="def">classTvsFds</a> :: <a href="GHC.html#t:Class">Class</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], [<a href="Class.html#t:FunDep">FunDep</a> <a href="GHC.html#t:TyVar">TyVar</a>])</p></div><div class="top"><p class="src"><a name="v:classATs" class="def">classATs</a> :: <a href="GHC.html#t:Class">Class</a> -> [<a href="GHC.html#t:TyCon">TyCon</a>]</p></div><div class="top"><p class="src"><a name="v:pprFundeps" class="def">pprFundeps</a> :: <a href="Outputable.html#t:Outputable">Outputable</a> a => [<a href="Class.html#t:FunDep">FunDep</a> a] -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><h2 id="g:21">Instances </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Instance" class="def">Instance</a> </p><div class="subs instances"><p id="control.i:Instance" class="caption collapser" onclick="toggleSection('i:Instance')">Instances</p><div id="section.i:Instance" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:Instance">Instance</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:Instance">Instance</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Instance">Instance</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:Instance">Instance</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:instanceDFunId" class="def">instanceDFunId</a> :: <a href="GHC.html#t:Instance">Instance</a> -> <a href="Var.html#t:DFunId">DFunId</a></p></div><div class="top"><p class="src"><a name="v:pprInstance" class="def">pprInstance</a> :: <a href="GHC.html#t:Instance">Instance</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:pprInstanceHdr" class="def">pprInstanceHdr</a> :: <a href="GHC.html#t:Instance">Instance</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:pprFamInst" class="def">pprFamInst</a> :: <a href="FamInstEnv.html#t:FamInst">FamInst</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:pprFamInstHdr" class="def">pprFamInstHdr</a> :: <a href="FamInstEnv.html#t:FamInst">FamInst</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><h2 id="g:22">Types and Kinds </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Type" class="def">Type</a> </p><div class="doc"><p>The key representation of types within the compiler </p></div><div class="subs instances"><p id="control.i:Type" class="caption collapser" onclick="toggleSection('i:Type')">Instances</p><div id="section.i:Type" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:Type">Type</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:Type">Type</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:Type">Type</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:splitForAllTys" class="def">splitForAllTys</a> :: <a href="GHC.html#t:Type">Type</a> -> ([<a href="GHC.html#t:TyVar">TyVar</a>], <a href="GHC.html#t:Type">Type</a>)</p><div class="doc"><p>Attempts to take a forall type apart, returning all the immediate such bound type variables and the remainder of the type. Always suceeds, even if that means returning an empty list of <code><a href="GHC.html#t:TyVar">TyVar</a></code>s </p></div></div><div class="top"><p class="src"><a name="v:funResultTy" class="def">funResultTy</a> :: <a href="GHC.html#t:Type">Type</a> -> <a href="GHC.html#t:Type">Type</a></p><div class="doc"><p>Extract the function result type and panic if that is not possible </p></div></div><div class="top"><p class="src"><a name="v:pprParendType" class="def">pprParendType</a> :: <a href="GHC.html#t:Type">Type</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:pprTypeApp" class="def">pprTypeApp</a> :: <a href="GHC.html#t:NamedThing">NamedThing</a> a => a -> [<a href="GHC.html#t:Type">Type</a>] -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Kind" class="def">Kind</a> = <a href="GHC.html#t:Type">Type</a></p><div class="doc"><p>The key type representing kinds in the compiler. Invariant: a kind is always in one of these forms: </p><pre> FunTy k1 k2 TyConApp PrimTyCon [...] TyVar kv -- (during inference only) ForAll ... -- (for top-level coercions) </pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PredType" class="def">PredType</a> = <a href="GHC.html#t:Type">Type</a></p><div class="doc"><p>A type of the form <code>p</code> of kind <code>Constraint</code> represents a value whose type is the Haskell predicate <code>p</code>, where a predicate is what occurs before the <code>=></code> in a Haskell type. </p><p>We use <code><a href="GHC.html#t:PredType">PredType</a></code> as documentation to mark those types that we guarantee to have this kind. </p><p>It can be expanded into its representation, but: </p><ul><li> The type checker must treat it as opaque </li><li> The rest of the compiler treats it as transparent </li></ul><p>Consider these examples: </p><pre> f :: (Eq a) => a -> Int g :: (?x :: Int -> Int) => a -> Int h :: (r\l) => {r} => {l::Int | r} </pre><p>Here the <code>Eq a</code> and <code>?x :: Int -> Int</code> and <code>rl</code> are all called "predicates" </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ThetaType" class="def">ThetaType</a> = [<a href="GHC.html#t:PredType">PredType</a>]</p><div class="doc"><p>A collection of <code><a href="GHC.html#t:PredType">PredType</a></code>s </p></div></div><div class="top"><p class="src"><a name="v:pprForAll" class="def">pprForAll</a> :: [<a href="GHC.html#t:TyVar">TyVar</a>] -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:pprThetaArrowTy" class="def">pprThetaArrowTy</a> :: <a href="GHC.html#t:ThetaType">ThetaType</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><h2 id="g:23">Entities </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TyThing" class="def">TyThing</a> </p><div class="doc"><p>A typecheckable-thing, essentially anything that has a name </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:AnId" class="def">AnId</a> <a href="GHC.html#t:Id">Id</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ADataCon" class="def">ADataCon</a> <a href="GHC.html#t:DataCon">DataCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ATyCon" class="def">ATyCon</a> <a href="GHC.html#t:TyCon">TyCon</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ACoAxiom" class="def">ACoAxiom</a> <a href="TyCon.html#t:CoAxiom">CoAxiom</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:TyThing" class="caption collapser" onclick="toggleSection('i:TyThing')">Instances</p><div id="section.i:TyThing" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="GHC.html#t:NamedThing">NamedThing</a> <a href="GHC.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr></table></div></div></div><h2 id="g:24">Syntax </h2><div class="top"><p class="src">module <a href="HsSyn.html">HsSyn</a></p></div><h2 id="g:25">Fixities </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FixityDirection" class="def">FixityDirection</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InfixL" class="def">InfixL</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:InfixR" class="def">InfixR</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:InfixN" class="def">InfixN</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:FixityDirection" class="caption collapser" onclick="toggleSection('i:FixityDirection')">Instances</p><div id="section.i:FixityDirection" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:FixityDirection">FixityDirection</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:FixityDirection">FixityDirection</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:FixityDirection">FixityDirection</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:FixityDirection">FixityDirection</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="GHC.html#t:FixityDirection">FixityDirection</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:defaultFixity" class="def">defaultFixity</a> :: <a href="BasicTypes.html#t:Fixity">Fixity</a></p></div><div class="top"><p class="src"><a name="v:maxPrecedence" class="def">maxPrecedence</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:negateFixity" class="def">negateFixity</a> :: <a href="BasicTypes.html#t:Fixity">Fixity</a></p></div><div class="top"><p class="src"><a name="v:compareFixity" class="def">compareFixity</a> :: <a href="BasicTypes.html#t:Fixity">Fixity</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a> -> (<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</p></div><h2 id="g:26">Source locations </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SrcLoc" class="def">SrcLoc</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RealSrcLoc" class="def">RealSrcLoc</a> !<a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:UnhelpfulLoc" class="def">UnhelpfulLoc</a> <a href="FastString.html#t:FastString">FastString</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SrcLoc" class="caption collapser" onclick="toggleSection('i:SrcLoc')">Instances</p><div id="section.i:SrcLoc" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:SrcLoc">SrcLoc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:SrcLoc">SrcLoc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:SrcLoc">SrcLoc</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:RealSrcLoc" class="def">RealSrcLoc</a> </p><div class="doc"><p>Represents a single point within a file </p></div><div class="subs instances"><p id="control.i:RealSrcLoc" class="caption collapser" onclick="toggleSection('i:RealSrcLoc')">Instances</p><div id="section.i:RealSrcLoc" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkSrcLoc" class="def">mkSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a></p></div><div class="top"><p class="src"><a name="v:noSrcLoc" class="def">noSrcLoc</a> :: <a href="GHC.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="GHC.html#t:SrcLoc">SrcLoc</a></code> values for particular locations </p></div></div><div class="top"><p class="src"><a name="v:srcLocFile" class="def">srcLocFile</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="FastString.html#t:FastString">FastString</a></p><div class="doc"><p>Gives the filename of the <code><a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a></code> </p></div></div><div class="top"><p class="src"><a name="v:srcLocLine" class="def">srcLocLine</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Raises an error when used on a <a href="bad.html">bad</a> <code><a href="GHC.html#t:SrcLoc">SrcLoc</a></code> </p></div></div><div class="top"><p class="src"><a name="v:srcLocCol" class="def">srcLocCol</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Raises an error when used on a <a href="bad.html">bad</a> <code><a href="GHC.html#t:SrcLoc">SrcLoc</a></code> </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SrcSpan" class="def">SrcSpan</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RealSrcSpan" class="def">RealSrcSpan</a> !<a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:UnhelpfulSpan" class="def">UnhelpfulSpan</a> !<a href="FastString.html#t:FastString">FastString</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SrcSpan" class="caption collapser" onclick="toggleSection('i:SrcSpan')">Instances</p><div id="section.i:SrcSpan" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:RealSrcSpan" class="def">RealSrcSpan</a> </p><div class="doc"><p>A SrcSpan delimits a portion of a text file. It could be represented by a pair of (line,column) coordinates, but in fact we optimise slightly by using more compact representations for single-line and zero-length spans, both of which are quite common. </p><p>The end position is defined to be the column <em>after</em> the end of the span. That is, a span of (1,1)-(1,2) is one character long, and a span of (1,1)-(1,1) is zero characters long. </p></div><div class="subs instances"><p id="control.i:RealSrcSpan" class="caption collapser" onclick="toggleSection('i:RealSrcSpan')">Instances</p><div id="section.i:RealSrcSpan" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkSrcSpan" class="def">mkSrcSpan</a> :: <a href="GHC.html#t:SrcLoc">SrcLoc</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Create a <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> between two points in a file </p></div></div><div class="top"><p class="src"><a name="v:srcLocSpan" class="def">srcLocSpan</a> :: <a href="GHC.html#t:SrcLoc">SrcLoc</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Create a <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> corresponding to a single point </p></div></div><div class="top"><p class="src"><a name="v:isGoodSrcSpan" class="def">isGoodSrcSpan</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test if a <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> is <a href="good.html">good</a>, i.e. has precise location information </p></div></div><div class="top"><p class="src"><a name="v:noSrcSpan" class="def">noSrcSpan</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code>s for common sources of location uncertainty </p></div></div><div class="top"><p class="src"><a name="v:srcSpanStart" class="def">srcSpanStart</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Returns the location at the start of the <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> or a <a href="bad.html">bad</a> <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> if that is unavailable </p></div></div><div class="top"><p class="src"><a name="v:srcSpanEnd" class="def">srcSpanEnd</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Returns the location at the end of the <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> or a <a href="bad.html">bad</a> <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code> if that is unavailable </p></div></div><div class="top"><p class="src"><a name="v:srcSpanFile" class="def">srcSpanFile</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="FastString.html#t:FastString">FastString</a></p></div><div class="top"><p class="src"><a name="v:srcSpanStartLine" class="def">srcSpanStartLine</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:srcSpanEndLine" class="def">srcSpanEndLine</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:srcSpanStartCol" class="def">srcSpanStartCol</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:srcSpanEndCol" class="def">srcSpanEndCol</a> :: <a href="GHC.html#t:RealSrcSpan">RealSrcSpan</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><h2 id="g:27">Located </h2><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GenLocated" class="def">GenLocated</a> l e </p><div class="doc"><p>We attach SrcSpans to lots of things, so let's have a datatype for it. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:L" class="def">L</a> l e</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:GenLocated" class="caption collapser" onclick="toggleSection('i:GenLocated')">Instances</p><div id="section.i:GenLocated" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable2">Typeable2</a> <a href="GHC.html#t:GenLocated">GenLocated</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="GHC.html#t:GenLocated">GenLocated</a> l)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> l, <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> e) => <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="GHC.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> l, <a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> e) => <a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> (<a href="GHC.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> l, <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> e) => <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="GHC.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="Outputable.html#t:Outputable">Outputable</a> l, <a href="Outputable.html#t:Outputable">Outputable</a> e) => <a href="Outputable.html#t:Outputable">Outputable</a> (<a href="GHC.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Located" class="def">Located</a> e = <a href="GHC.html#t:GenLocated">GenLocated</a> <a href="GHC.html#t:SrcSpan">SrcSpan</a> e</p></div><h3 id="g:28">Constructing Located </h3><div class="top"><p class="src"><a name="v:noLoc" class="def">noLoc</a> :: e -> <a href="GHC.html#t:Located">Located</a> e</p></div><div class="top"><p class="src"><a name="v:mkGeneralLocated" class="def">mkGeneralLocated</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> e -> <a href="GHC.html#t:Located">Located</a> e</p></div><h3 id="g:29">Deconstructing Located </h3><div class="top"><p class="src"><a name="v:getLoc" class="def">getLoc</a> :: <a href="GHC.html#t:GenLocated">GenLocated</a> l e -> l</p></div><div class="top"><p class="src"><a name="v:unLoc" class="def">unLoc</a> :: <a href="GHC.html#t:GenLocated">GenLocated</a> l e -> e</p></div><h3 id="g:30">Combining and comparing Located values </h3><div class="top"><p class="src"><a name="v:eqLocated" class="def">eqLocated</a> :: <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> a -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Tests whether the two located things are equal </p></div></div><div class="top"><p class="src"><a name="v:cmpLocated" class="def">cmpLocated</a> :: <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> a -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Tests the ordering of the two located things </p></div></div><div class="top"><p class="src"><a name="v:combineLocs" class="def">combineLocs</a> :: <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> b -> <a href="GHC.html#t:SrcSpan">SrcSpan</a></p></div><div class="top"><p class="src"><a name="v:addCLoc" class="def">addCLoc</a> :: <a href="GHC.html#t:Located">Located</a> a -> <a href="GHC.html#t:Located">Located</a> b -> c -> <a href="GHC.html#t:Located">Located</a> c</p><div class="doc"><p>Combine locations from two <code><a href="GHC.html#t:Located">Located</a></code> things and add them to a third thing </p></div></div><div class="top"><p class="src"><a name="v:leftmost_smallest" class="def">leftmost_smallest</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Alternative strategies for ordering <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code>s </p></div></div><div class="top"><p class="src"><a name="v:leftmost_largest" class="def">leftmost_largest</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Alternative strategies for ordering <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code>s </p></div></div><div class="top"><p class="src"><a name="v:rightmost" class="def">rightmost</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Alternative strategies for ordering <code><a href="GHC.html#t:SrcSpan">SrcSpan</a></code>s </p></div></div><div class="top"><p class="src"><a name="v:spans" class="def">spans</a> :: <a href="GHC.html#t:SrcSpan">SrcSpan</a> -> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>) -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Determines whether a span encloses a given line and column index </p></div></div><div class="top"><p class="src"><a name="v:isSubspanOf" class="def">isSubspanOf</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc"><p>The span that may be enclosed by the other </p></td></tr><tr><td class="src">-> <a href="GHC.html#t:SrcSpan">SrcSpan</a></td><td class="doc"><p>The span it may be enclosed by </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Determines whether a span is enclosed by another one </p></div></div><h1 id="g:31">Exceptions </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GhcException" class="def">GhcException</a> </p><div class="doc"><p>GHC's own exception type error messages all take the form: </p><pre> <a href="location">location</a>: <a href="error">error</a> </pre><p>If the location is on the command line, or in GHC itself, then <a href="location">location</a>=<a href="ghc.html">ghc</a>. All of the error types below correspond to a <a href="location">location</a> of <a href="ghc.html">ghc</a>, except for ProgramError (where the string is assumed to contain a location already, so we don't print one). </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PhaseFailed" class="def">PhaseFailed</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> <a href="../base-4.5.1.0/System-Exit.html#t:ExitCode">ExitCode</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Signal" class="def">Signal</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Some other fatal signal (SIGHUP,SIGTERM) </p></td></tr><tr><td class="src"><a name="v:UsageError" class="def">UsageError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Prints the short usage msg after the error </p></td></tr><tr><td class="src"><a name="v:CmdLineError" class="def">CmdLineError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>A problem with the command line arguments, but don't print usage. </p></td></tr><tr><td class="src"><a name="v:Panic" class="def">Panic</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The <code>impossible</code> happened. </p></td></tr><tr><td class="src"><a name="v:Sorry" class="def">Sorry</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The user tickled something that's known not to work yet, but we're not counting it as a bug. </p></td></tr><tr><td class="src"><a name="v:InstallationError" class="def">InstallationError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>An installation problem. </p></td></tr><tr><td class="src"><a name="v:ProgramError" class="def">ProgramError</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>An error in the user's code, probably. </p></td></tr></table></div><div class="subs instances"><p id="control.i:GhcException" class="caption collapser" onclick="toggleSection('i:GhcException')">Instances</p><div id="section.i:GhcException" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="GHC.html#t:GhcException">GhcException</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:GhcException">GhcException</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="GHC.html#t:GhcException">GhcException</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Panic.html#t:Exception">Exception</a> <a href="GHC.html#t:GhcException">GhcException</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:showGhcException" class="def">showGhcException</a> :: <a href="GHC.html#t:GhcException">GhcException</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Append a description of the given exception to this string. </p></div></div><h1 id="g:32">Token stream manipulations </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Token" class="def">Token</a> </p><div class="subs instances"><p id="control.i:Token" class="caption collapser" onclick="toggleSection('i:Token')">Instances</p><div id="section.i:Token" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="GHC.html#t:Token">Token</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getTokenStream" class="def">getTokenStream</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m [<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>]</p><div class="doc"><p>Return module source as token stream, including comments. </p><p>The module must be in the module graph and its source must be available. Throws a <code><a href="HscTypes.html#t:SourceError">SourceError</a></code> on parse error. </p></div></div><div class="top"><p class="src"><a name="v:getRichTokenStream" class="def">getRichTokenStream</a> :: <a href="GHC.html#t:GhcMonad">GhcMonad</a> m => <a href="GHC.html#t:Module">Module</a> -> m [(<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)]</p><div class="doc"><p>Give even more information on the source than <code><a href="GHC.html#v:getTokenStream">getTokenStream</a></code> This function allows reconstructing the source completely with <code><a href="GHC.html#v:showRichTokenStream">showRichTokenStream</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:showRichTokenStream" class="def">showRichTokenStream</a> :: [(<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)] -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Take a rich token stream such as produced from <code><a href="GHC.html#v:getRichTokenStream">getRichTokenStream</a></code> and return source code almost identical to the original code (except for insignificant whitespace.) </p></div></div><div class="top"><p class="src"><a name="v:addSourceToTokens" class="def">addSourceToTokens</a> :: <a href="GHC.html#t:RealSrcLoc">RealSrcLoc</a> -> <a href="StringBuffer.html#t:StringBuffer">StringBuffer</a> -> [<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>] -> [(<a href="GHC.html#t:Located">Located</a> <a href="GHC.html#t:Token">Token</a>, <a href="../base-4.5.1.0/Data-String.html#t:String">String</a>)]</p><div class="doc"><p>Given a source location and a StringBuffer corresponding to this location, return a rich token stream with the source associated to the tokens. </p></div></div><h1 id="g:33">Pure interface to the parser </h1><div class="top"><p class="src"><a name="v:parser" class="def">parser</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Haskell module source text (full Unicode is supported) </p></td></tr><tr><td class="src">-> <a href="GHC.html#t:DynFlags">DynFlags</a></td><td class="doc"><p>the flags </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>the filename (for source locations) </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Either.html#t:Either">Either</a> <a href="ErrUtils.html#t:ErrorMessages">ErrorMessages</a> (<a href="ErrUtils.html#t:WarningMessages">WarningMessages</a>, <a href="GHC.html#t:Located">Located</a> (<a href="HsSyn.html#t:HsModule">HsModule</a> <a href="GHC.html#t:RdrName">RdrName</a>))</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>A pure interface to the module parser. </p></div></div><h1 id="g:34">Miscellaneous </h1><div class="top"><p class="src"><a name="v:cyclicModuleErr" class="def">cyclicModuleErr</a> :: [<a href="GHC.html#t:ModSummary">ModSummary</a>] -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>