<!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>HscTypes</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_HscTypes.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">HscTypes</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">compilation state </a></li><li><a href="#g:2">Information about modules </a></li><li><a href="#g:3">Information about the module being compiled </a></li><li><a href="#g:4">State relating to modules in this package </a></li><li><a href="#g:5">State relating to known packages </a></li><li><a href="#g:6">Annotations </a></li><li><a href="#g:7">Interactive context </a></li><li><a href="#g:8">Interfaces </a></li><li><a href="#g:9">Fixity </a></li><li><a href="#g:10">TyThings and type environments </a></li><li><a href="#g:11">MonadThings </a></li><li><a href="#g:12">Information on imports and exports </a></li><li><a href="#g:13">Warnings </a></li><li><a href="#g:14">Linker stuff </a></li><li><a href="#g:15">Program coverage </a></li><li><a href="#g:16">Breakpoints </a></li><li><a href="#g:17">Vectorisation information </a></li><li><a href="#g:18">Safe Haskell information </a></li><li><a href="#g:19">result of the parser </a></li><li><a href="#g:20">Compilation errors and warnings </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Types for the per-module compiler </p></div></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"><span class="keyword">data</span> <a href="#t:HscEnv">HscEnv</a> = <a href="#v:HscEnv">HscEnv</a> {<ul class="subs"><li><a href="#v:hsc_dflags">hsc_dflags</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a></li><li><a href="#v:hsc_targets">hsc_targets</a> :: [<a href="HscTypes.html#t:Target">Target</a>]</li><li><a href="#v:hsc_mod_graph">hsc_mod_graph</a> :: <a href="HscTypes.html#t:ModuleGraph">ModuleGraph</a></li><li><a href="#v:hsc_IC">hsc_IC</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></li><li><a href="#v:hsc_HPT">hsc_HPT</a> :: <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></li><li><a href="#v:hsc_EPS">hsc_EPS</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a>)</li><li><a href="#v:hsc_NC">hsc_NC</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:NameCache">NameCache</a>)</li><li><a href="#v:hsc_FC">hsc_FC</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:FinderCache">FinderCache</a>)</li><li><a href="#v:hsc_MLC">hsc_MLC</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:ModLocationCache">ModLocationCache</a>)</li><li><a href="#v:hsc_OptFuel">hsc_OptFuel</a> :: <a href="OptimizationFuel.html#t:OptFuelState">OptFuelState</a></li><li><a href="#v:hsc_type_env_var">hsc_type_env_var</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Module.html#t:Module">Module</a>, <a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a>)</li></ul>}</li><li class="src short"><a href="#v:hscEPS">hscEPS</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:FinderCache">FinderCache</a> = <a href="Module.html#t:ModuleNameEnv">ModuleNameEnv</a> <a href="HscTypes.html#t:FindResult">FindResult</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:FindResult">FindResult</a> <ul class="subs"><li>= <a href="#v:Found">Found</a> <a href="Module.html#t:ModLocation">ModLocation</a> <a href="Module.html#t:Module">Module</a> </li><li>| <a href="#v:NoPackage">NoPackage</a> <a href="Module.html#t:PackageId">PackageId</a> </li><li>| <a href="#v:FoundMultiple">FoundMultiple</a> [<a href="Module.html#t:PackageId">PackageId</a>] </li><li>| <a href="#v:NotFound">NotFound</a> { <ul class="subs"><li><a href="#v:fr_paths">fr_paths</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li><a href="#v:fr_pkg">fr_pkg</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Module.html#t:PackageId">PackageId</a></li><li><a href="#v:fr_mods_hidden">fr_mods_hidden</a> :: [<a href="Module.html#t:PackageId">PackageId</a>]</li><li><a href="#v:fr_pkgs_hidden">fr_pkgs_hidden</a> :: [<a href="Module.html#t:PackageId">PackageId</a>]</li><li><a href="#v:fr_suggestions">fr_suggestions</a> :: [<a href="Module.html#t:Module">Module</a>]</li></ul> }</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:ModLocationCache">ModLocationCache</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> <a href="Module.html#t:ModLocation">ModLocation</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="HscTypes.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="Module.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="DriverPhases.html#t:Phase">Phase</a>) </li></ul></li><li class="src short"><a href="#v:pprTarget">pprTarget</a> :: <a href="HscTypes.html#t:Target">Target</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><a href="#v:pprTargetId">pprTargetId</a> :: <a href="HscTypes.html#t:TargetId">TargetId</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ModuleGraph">ModuleGraph</a> = [<a href="HscTypes.html#t:ModSummary">ModSummary</a>]</li><li class="src short"><a href="#v:emptyMG">emptyMG</a> :: <a href="HscTypes.html#t:ModuleGraph">ModuleGraph</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ModDetails">ModDetails</a> = <a href="#v:ModDetails">ModDetails</a> {<ul class="subs"><li><a href="#v:md_exports">md_exports</a> :: [<a href="Avail.html#t:AvailInfo">AvailInfo</a>]</li><li><a href="#v:md_types">md_types</a> :: !<a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li><a href="#v:md_insts">md_insts</a> :: ![<a href="InstEnv.html#t:Instance">Instance</a>]</li><li><a href="#v:md_fam_insts">md_fam_insts</a> :: ![<a href="FamInstEnv.html#t:FamInst">FamInst</a>]</li><li><a href="#v:md_rules">md_rules</a> :: ![<a href="CoreSyn.html#t:CoreRule">CoreRule</a>]</li><li><a href="#v:md_anns">md_anns</a> :: ![<a href="Annotations.html#t:Annotation">Annotation</a>]</li><li><a href="#v:md_vect_info">md_vect_info</a> :: !<a href="HscTypes.html#t:VectInfo">VectInfo</a></li></ul>}</li><li class="src short"><a href="#v:emptyModDetails">emptyModDetails</a> :: <a href="HscTypes.html#t:ModDetails">ModDetails</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ModGuts">ModGuts</a> = <a href="#v:ModGuts">ModGuts</a> {<ul class="subs"><li><a href="#v:mg_module">mg_module</a> :: !<a href="Module.html#t:Module">Module</a></li><li><a href="#v:mg_boot">mg_boot</a> :: <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a></li><li><a href="#v:mg_exports">mg_exports</a> :: ![<a href="Avail.html#t:AvailInfo">AvailInfo</a>]</li><li><a href="#v:mg_deps">mg_deps</a> :: !<a href="HscTypes.html#t:Dependencies">Dependencies</a></li><li><a href="#v:mg_dir_imps">mg_dir_imps</a> :: !<a href="HscTypes.html#t:ImportedMods">ImportedMods</a></li><li><a href="#v:mg_used_names">mg_used_names</a> :: !<a href="NameSet.html#t:NameSet">NameSet</a></li><li><a href="#v:mg_used_th">mg_used_th</a> :: !<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:mg_rdr_env">mg_rdr_env</a> :: !<a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></li><li><a href="#v:mg_fix_env">mg_fix_env</a> :: !<a href="HscTypes.html#t:FixityEnv">FixityEnv</a></li><li><a href="#v:mg_tcs">mg_tcs</a> :: ![<a href="TyCon.html#t:TyCon">TyCon</a>]</li><li><a href="#v:mg_insts">mg_insts</a> :: ![<a href="InstEnv.html#t:Instance">Instance</a>]</li><li><a href="#v:mg_fam_insts">mg_fam_insts</a> :: ![<a href="FamInstEnv.html#t:FamInst">FamInst</a>]</li><li><a href="#v:mg_rules">mg_rules</a> :: ![<a href="CoreSyn.html#t:CoreRule">CoreRule</a>]</li><li><a href="#v:mg_binds">mg_binds</a> :: !<a href="CoreSyn.html#t:CoreProgram">CoreProgram</a></li><li><a href="#v:mg_foreign">mg_foreign</a> :: !<a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a></li><li><a href="#v:mg_warns">mg_warns</a> :: !<a href="HscTypes.html#t:Warnings">Warnings</a></li><li><a href="#v:mg_anns">mg_anns</a> :: [<a href="Annotations.html#t:Annotation">Annotation</a>]</li><li><a href="#v:mg_hpc_info">mg_hpc_info</a> :: !<a href="HscTypes.html#t:HpcInfo">HpcInfo</a></li><li><a href="#v:mg_modBreaks">mg_modBreaks</a> :: !<a href="HscTypes.html#t:ModBreaks">ModBreaks</a></li><li><a href="#v:mg_vect_decls">mg_vect_decls</a> :: ![<a href="CoreSyn.html#t:CoreVect">CoreVect</a>]</li><li><a href="#v:mg_vect_info">mg_vect_info</a> :: !<a href="HscTypes.html#t:VectInfo">VectInfo</a></li><li><a href="#v:mg_inst_env">mg_inst_env</a> :: <a href="InstEnv.html#t:InstEnv">InstEnv</a></li><li><a href="#v:mg_fam_inst_env">mg_fam_inst_env</a> :: <a href="FamInstEnv.html#t:FamInstEnv">FamInstEnv</a></li><li><a href="#v:mg_safe_haskell">mg_safe_haskell</a> :: <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a></li><li><a href="#v:mg_trust_pkg">mg_trust_pkg</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:mg_dependent_files">mg_dependent_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:CgGuts">CgGuts</a> = <a href="#v:CgGuts">CgGuts</a> {<ul class="subs"><li><a href="#v:cg_module">cg_module</a> :: !<a href="Module.html#t:Module">Module</a></li><li><a href="#v:cg_tycons">cg_tycons</a> :: [<a href="TyCon.html#t:TyCon">TyCon</a>]</li><li><a href="#v:cg_binds">cg_binds</a> :: <a href="CoreSyn.html#t:CoreProgram">CoreProgram</a></li><li><a href="#v:cg_foreign">cg_foreign</a> :: !<a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a></li><li><a href="#v:cg_dep_pkgs">cg_dep_pkgs</a> :: ![<a href="Module.html#t:PackageId">PackageId</a>]</li><li><a href="#v:cg_hpc_info">cg_hpc_info</a> :: !<a href="HscTypes.html#t:HpcInfo">HpcInfo</a></li><li><a href="#v:cg_modBreaks">cg_modBreaks</a> :: !<a href="HscTypes.html#t:ModBreaks">ModBreaks</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:ForeignStubs">ForeignStubs</a> <ul class="subs"><li>= <a href="#v:NoStubs">NoStubs</a> </li><li>| <a href="#v:ForeignStubs">ForeignStubs</a> <a href="Outputable.html#t:SDoc">SDoc</a> <a href="Outputable.html#t:SDoc">SDoc</a> </li></ul></li><li class="src short"><a href="#v:appendStubC">appendStubC</a> :: <a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a> -> <a href="Outputable.html#t:SDoc">SDoc</a> -> <a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ImportedMods">ImportedMods</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> [<a href="HscTypes.html#t:ImportedModsVal">ImportedModsVal</a>]</li><li class="src short"><span class="keyword">type</span> <a href="#t:ImportedModsVal">ImportedModsVal</a> = (<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>, <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a>, <a href="HscTypes.html#t:IsSafeImport">IsSafeImport</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="Module.html#t:Module">Module</a></li><li><a href="#v:ms_hsc_src">ms_hsc_src</a> :: <a href="HscTypes.html#t:HscSource">HscSource</a></li><li><a href="#v:ms_location">ms_location</a> :: <a href="Module.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="SrcLoc.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="RdrName.html#t:RdrName">RdrName</a>)]</li><li><a href="#v:ms_textual_imps">ms_textual_imps</a> :: [<a href="SrcLoc.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="RdrName.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="DynFlags.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_imps">ms_imps</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> [<a href="SrcLoc.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="RdrName.html#t:RdrName">RdrName</a>)]</li><li class="src short"><a href="#v:ms_mod_name">ms_mod_name</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="Module.html#t:ModuleName">ModuleName</a></li><li class="src short"><a href="#v:showModMsg">showModMsg</a> :: <a href="DynFlags.html#t:HscTarget">HscTarget</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:isBootSummary">isBootSummary</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:msHsFilePath">msHsFilePath</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:msHiFilePath">msHiFilePath</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:msObjFilePath">msObjFilePath</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SourceModified">SourceModified</a> <ul class="subs"><li>= <a href="#v:SourceModified">SourceModified</a> </li><li>| <a href="#v:SourceUnmodified">SourceUnmodified</a> </li><li>| <a href="#v:SourceUnmodifiedAndStable">SourceUnmodifiedAndStable</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:HscSource">HscSource</a> <ul class="subs"><li>= <a href="#v:HsSrcFile">HsSrcFile</a> </li><li>| <a href="#v:HsBootFile">HsBootFile</a> </li><li>| <a href="#v:ExtCoreFile">ExtCoreFile</a> </li></ul></li><li class="src short"><a href="#v:isHsBoot">isHsBoot</a> :: <a href="HscTypes.html#t:HscSource">HscSource</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:hscSourceString">hscSourceString</a> :: <a href="HscTypes.html#t:HscSource">HscSource</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:HomePackageTable">HomePackageTable</a> = <a href="Module.html#t:ModuleNameEnv">ModuleNameEnv</a> <a href="HscTypes.html#t:HomeModInfo">HomeModInfo</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:HomeModInfo">HomeModInfo</a> = <a href="#v:HomeModInfo">HomeModInfo</a> {<ul class="subs"><li><a href="#v:hm_iface">hm_iface</a> :: !<a href="HscTypes.html#t:ModIface">ModIface</a></li><li><a href="#v:hm_details">hm_details</a> :: !<a href="HscTypes.html#t:ModDetails">ModDetails</a></li><li><a href="#v:hm_linkable">hm_linkable</a> :: !(<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:Linkable">Linkable</a>)</li></ul>}</li><li class="src short"><a href="#v:emptyHomePackageTable">emptyHomePackageTable</a> :: <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></li><li class="src short"><a href="#v:hptInstances">hptInstances</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> (<a href="Module.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -> ([<a href="InstEnv.html#t:Instance">Instance</a>], [<a href="FamInstEnv.html#t:FamInst">FamInst</a>])</li><li class="src short"><a href="#v:hptRules">hptRules</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> [(<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a>)] -> [<a href="CoreSyn.html#t:CoreRule">CoreRule</a>]</li><li class="src short"><a href="#v:hptVectInfo">hptVectInfo</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="HscTypes.html#t:VectInfo">VectInfo</a></li><li class="src short"><a href="#v:hptObjs">hptObjs</a> :: <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a> -> [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:ExternalPackageState">ExternalPackageState</a> = <a href="#v:EPS">EPS</a> {<ul class="subs"><li><a href="#v:eps_is_boot">eps_is_boot</a> :: !(<a href="Module.html#t:ModuleNameEnv">ModuleNameEnv</a> (<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a>))</li><li><a href="#v:eps_PIT">eps_PIT</a> :: !<a href="HscTypes.html#t:PackageIfaceTable">PackageIfaceTable</a></li><li><a href="#v:eps_PTE">eps_PTE</a> :: !<a href="HscTypes.html#t:PackageTypeEnv">PackageTypeEnv</a></li><li><a href="#v:eps_inst_env">eps_inst_env</a> :: !<a href="HscTypes.html#t:PackageInstEnv">PackageInstEnv</a></li><li><a href="#v:eps_fam_inst_env">eps_fam_inst_env</a> :: !PackageFamInstEnv</li><li><a href="#v:eps_rule_base">eps_rule_base</a> :: !<a href="HscTypes.html#t:PackageRuleBase">PackageRuleBase</a></li><li><a href="#v:eps_vect_info">eps_vect_info</a> :: !PackageVectInfo</li><li><a href="#v:eps_ann_env">eps_ann_env</a> :: !PackageAnnEnv</li><li><a href="#v:eps_mod_fam_inst_env">eps_mod_fam_inst_env</a> :: !(<a href="Module.html#t:ModuleEnv">ModuleEnv</a> <a href="FamInstEnv.html#t:FamInstEnv">FamInstEnv</a>)</li><li><a href="#v:eps_stats">eps_stats</a> :: !<a href="HscTypes.html#t:EpsStats">EpsStats</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:EpsStats">EpsStats</a> = <a href="#v:EpsStats">EpsStats</a> {<ul class="subs"><li><a href="#v:n_ifaces_in">n_ifaces_in</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:n_decls_in">n_decls_in</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:n_decls_out">n_decls_out</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:n_rules_in">n_rules_in</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:n_rules_out">n_rules_out</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:n_insts_in">n_insts_in</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:n_insts_out">n_insts_out</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><a href="#v:addEpsInStats">addEpsInStats</a> :: <a href="HscTypes.html#t:EpsStats">EpsStats</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-Int.html#t:Int">Int</a> -> <a href="HscTypes.html#t:EpsStats">EpsStats</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:PackageTypeEnv">PackageTypeEnv</a> = <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:PackageIfaceTable">PackageIfaceTable</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> <a href="HscTypes.html#t:ModIface">ModIface</a></li><li class="src short"><a href="#v:emptyPackageIfaceTable">emptyPackageIfaceTable</a> :: <a href="HscTypes.html#t:PackageIfaceTable">PackageIfaceTable</a></li><li class="src short"><a href="#v:lookupIfaceByModule">lookupIfaceByModule</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a> -> <a href="HscTypes.html#t:PackageIfaceTable">PackageIfaceTable</a> -> <a href="Module.html#t:Module">Module</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModIface">ModIface</a></li><li class="src short"><a href="#v:emptyModIface">emptyModIface</a> :: <a href="Module.html#t:Module">Module</a> -> <a href="HscTypes.html#t:ModIface">ModIface</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:PackageInstEnv">PackageInstEnv</a> = <a href="InstEnv.html#t:InstEnv">InstEnv</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:PackageRuleBase">PackageRuleBase</a> = <a href="Rules.html#t:RuleBase">RuleBase</a></li><li class="src short"><a href="#v:prepareAnnotations">prepareAnnotations</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModGuts">ModGuts</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Annotations.html#t:AnnEnv">AnnEnv</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:InteractiveContext">InteractiveContext</a> = <a href="#v:InteractiveContext">InteractiveContext</a> {<ul class="subs"><li><a href="#v:ic_imports">ic_imports</a> :: [<a href="HscTypes.html#t:InteractiveImport">InteractiveImport</a>]</li><li><a href="#v:ic_rn_gbl_env">ic_rn_gbl_env</a> :: <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></li><li><a href="#v:ic_tythings">ic_tythings</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>]</li><li><a href="#v:ic_sys_vars">ic_sys_vars</a> :: [<a href="Var.html#t:Id">Id</a>]</li><li><a href="#v:ic_instances">ic_instances</a> :: ([<a href="InstEnv.html#t:Instance">Instance</a>], [<a href="FamInstEnv.html#t:FamInst">FamInst</a>])</li><li><a href="#v:ic_resume">ic_resume</a> :: [<a href="InteractiveEval.html#t:Resume">Resume</a>]</li><li><a href="#v:ic_cwd">ic_cwd</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></ul>}</li><li class="src short"><a href="#v:emptyInteractiveContext">emptyInteractiveContext</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></li><li class="src short"><a href="#v:icPrintUnqual">icPrintUnqual</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> <a href="Outputable.html#t:PrintUnqualified">PrintUnqualified</a></li><li class="src short"><a href="#v:icInScopeTTs">icInScopeTTs</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:icPlusGblRdrEnv">icPlusGblRdrEnv</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a> -> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></li><li class="src short"><a href="#v:extendInteractiveContext">extendInteractiveContext</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></li><li class="src short"><a href="#v:substInteractiveContext">substInteractiveContext</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> <a href="Type.html#t:TvSubst">TvSubst</a> -> <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></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="RdrName.html#t:RdrName">RdrName</a>) </li><li>| <a href="#v:IIModule">IIModule</a> <a href="Module.html#t:Module">Module</a> </li></ul></li><li class="src short"><a href="#v:mkPrintUnqualified">mkPrintUnqualified</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a> -> <a href="Outputable.html#t:PrintUnqualified">PrintUnqualified</a></li><li class="src short"><a href="#v:pprModulePrefix">pprModulePrefix</a> :: <a href="Outputable.html#t:PprStyle">PprStyle</a> -> <a href="Module.html#t:Module">Module</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="Outputable.html#t:SDoc">SDoc</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="Module.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="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.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"><a href="#v:mkIfaceWarnCache">mkIfaceWarnCache</a> :: <a href="HscTypes.html#t:Warnings">Warnings</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></li><li class="src short"><a href="#v:mkIfaceHashCache">mkIfaceHashCache</a> :: [(<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>, <a href="IfaceSyn.html#t:IfaceDecl">IfaceDecl</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 class="src short"><a href="#v:mkIfaceFixCache">mkIfaceFixCache</a> :: [(<a href="OccName.html#t:OccName">OccName</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>)] -> <a href="OccName.html#t:OccName">OccName</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a></li><li class="src short"><a href="#v:emptyIfaceWarnCache">emptyIfaceWarnCache</a> :: <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:FixityEnv">FixityEnv</a> = <a href="NameEnv.html#t:NameEnv">NameEnv</a> <a href="HscTypes.html#t:FixItem">FixItem</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:FixItem">FixItem</a> = <a href="#v:FixItem">FixItem</a> <a href="OccName.html#t:OccName">OccName</a> <a href="BasicTypes.html#t:Fixity">Fixity</a></li><li class="src short"><a href="#v:lookupFixity">lookupFixity</a> :: <a href="HscTypes.html#t:FixityEnv">FixityEnv</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a></li><li class="src short"><a href="#v:emptyFixityEnv">emptyFixityEnv</a> :: <a href="HscTypes.html#t:FixityEnv">FixityEnv</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="Var.html#t:Id">Id</a> </li><li>| <a href="#v:ADataCon">ADataCon</a> <a href="DataCon.html#t:DataCon">DataCon</a> </li><li>| <a href="#v:ATyCon">ATyCon</a> <a href="TyCon.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"><a href="#v:tyThingAvailInfo">tyThingAvailInfo</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="Avail.html#t:AvailInfo">AvailInfo</a></li><li class="src short"><a href="#v:tyThingTyCon">tyThingTyCon</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="TyCon.html#t:TyCon">TyCon</a></li><li class="src short"><a href="#v:tyThingDataCon">tyThingDataCon</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="DataCon.html#t:DataCon">DataCon</a></li><li class="src short"><a href="#v:tyThingId">tyThingId</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="Var.html#t:Id">Id</a></li><li class="src short"><a href="#v:tyThingCoAxiom">tyThingCoAxiom</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="TyCon.html#t:CoAxiom">CoAxiom</a></li><li class="src short"><a href="#v:tyThingParent_maybe">tyThingParent_maybe</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:TyThing">TyThing</a></li><li class="src short"><a href="#v:tyThingsTyVars">tyThingsTyVars</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="VarSet.html#t:TyVarSet">TyVarSet</a></li><li class="src short"><a href="#v:implicitTyThings">implicitTyThings</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:implicitTyConThings">implicitTyConThings</a> :: <a href="TyCon.html#t:TyCon">TyCon</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:implicitClassThings">implicitClassThings</a> :: <a href="Class.html#t:Class">Class</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:isImplicitTyThing">isImplicitTyThing</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TypeEnv">TypeEnv</a> = <a href="NameEnv.html#t:NameEnv">NameEnv</a> <a href="HscTypes.html#t:TyThing">TyThing</a></li><li class="src short"><a href="#v:lookupType">lookupType</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a> -> <a href="HscTypes.html#t:PackageTypeEnv">PackageTypeEnv</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:TyThing">TyThing</a></li><li class="src short"><a href="#v:lookupTypeHscEnv">lookupTypeHscEnv</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="Name.html#t:Name">Name</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="HscTypes.html#t:TyThing">TyThing</a>)</li><li class="src short"><a href="#v:mkTypeEnv">mkTypeEnv</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:emptyTypeEnv">emptyTypeEnv</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:typeEnvFromEntities">typeEnvFromEntities</a> :: [<a href="Var.html#t:Id">Id</a>] -> [<a href="TyCon.html#t:TyCon">TyCon</a>] -> [<a href="FamInstEnv.html#t:FamInst">FamInst</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:mkTypeEnvWithImplicits">mkTypeEnvWithImplicits</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:extendTypeEnv">extendTypeEnv</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:extendTypeEnvList">extendTypeEnvList</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:extendTypeEnvWithIds">extendTypeEnvWithIds</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="Var.html#t:Id">Id</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></li><li class="src short"><a href="#v:lookupTypeEnv">lookupTypeEnv</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:TyThing">TyThing</a></li><li class="src short"><a href="#v:typeEnvElts">typeEnvElts</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</li><li class="src short"><a href="#v:typeEnvTyCons">typeEnvTyCons</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="TyCon.html#t:TyCon">TyCon</a>]</li><li class="src short"><a href="#v:typeEnvIds">typeEnvIds</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="Var.html#t:Id">Id</a>]</li><li class="src short"><a href="#v:typeEnvDataCons">typeEnvDataCons</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="DataCon.html#t:DataCon">DataCon</a>]</li><li class="src short"><a href="#v:typeEnvCoAxioms">typeEnvCoAxioms</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="TyCon.html#t:CoAxiom">CoAxiom</a>]</li><li class="src short"><a href="#v:typeEnvClasses">typeEnvClasses</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="Class.html#t:Class">Class</a>]</li><li class="src short"><span class="keyword">class</span> <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="#t:MonadThings">MonadThings</a> m <span class="keyword">where</span><ul class="subs"><li><a href="#v:lookupThing">lookupThing</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="HscTypes.html#t:TyThing">TyThing</a></li><li><a href="#v:lookupId">lookupId</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="Var.html#t:Id">Id</a></li><li><a href="#v:lookupDataCon">lookupDataCon</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="DataCon.html#t:DataCon">DataCon</a></li><li><a href="#v:lookupTyCon">lookupTyCon</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="TyCon.html#t:TyCon">TyCon</a></li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:WhetherHasOrphans">WhetherHasOrphans</a> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:IsBootInterface">IsBootInterface</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:Usage">Usage</a> <ul class="subs"><li>= <a href="#v:UsagePackageModule">UsagePackageModule</a> { <ul class="subs"><li><a href="#v:usg_mod">usg_mod</a> :: <a href="Module.html#t:Module">Module</a></li><li><a href="#v:usg_mod_hash">usg_mod_hash</a> :: <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:usg_safe">usg_safe</a> :: <a href="HscTypes.html#t:IsSafeImport">IsSafeImport</a></li></ul> }</li><li>| <a href="#v:UsageHomeModule">UsageHomeModule</a> { <ul class="subs"><li><a href="#v:usg_mod_name">usg_mod_name</a> :: <a href="Module.html#t:ModuleName">ModuleName</a></li><li><a href="#v:usg_mod_hash">usg_mod_hash</a> :: <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:usg_entities">usg_entities</a> :: [(<a href="OccName.html#t:OccName">OccName</a>, <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>)]</li><li><a href="#v:usg_exports">usg_exports</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></li><li><a href="#v:usg_safe">usg_safe</a> :: <a href="HscTypes.html#t:IsSafeImport">IsSafeImport</a></li></ul> }</li><li>| <a href="#v:UsageFile">UsageFile</a> { <ul class="subs"><li><a href="#v:usg_file_path">usg_file_path</a> :: <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:usg_mtime">usg_mtime</a> :: <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></li></ul> }</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Dependencies">Dependencies</a> = <a href="#v:Deps">Deps</a> {<ul class="subs"><li><a href="#v:dep_mods">dep_mods</a> :: [(<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a>)]</li><li><a href="#v:dep_pkgs">dep_pkgs</a> :: [(<a href="Module.html#t:PackageId">PackageId</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)]</li><li><a href="#v:dep_orphs">dep_orphs</a> :: [<a href="Module.html#t:Module">Module</a>]</li><li><a href="#v:dep_finsts">dep_finsts</a> :: [<a href="Module.html#t:Module">Module</a>]</li></ul>}</li><li class="src short"><a href="#v:noDependencies">noDependencies</a> :: <a href="HscTypes.html#t:Dependencies">Dependencies</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:NameCache">NameCache</a> = <a href="#v:NameCache">NameCache</a> {<ul class="subs"><li><a href="#v:nsUniqs">nsUniqs</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></li><li><a href="#v:nsNames">nsNames</a> :: <a href="HscTypes.html#t:OrigNameCache">OrigNameCache</a></li><li><a href="#v:nsIPs">nsIPs</a> :: <a href="HscTypes.html#t:OrigIParamCache">OrigIParamCache</a></li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:OrigNameCache">OrigNameCache</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> (<a href="OccName.html#t:OccEnv">OccEnv</a> <a href="Name.html#t:Name">Name</a>)</li><li class="src short"><span class="keyword">type</span> <a href="#t:OrigIParamCache">OrigIParamCache</a> = <a href="../containers-0.4.2.1/Data-Map.html#t:Map">Map</a> <a href="FastString.html#t:FastString">FastString</a> (<a href="BasicTypes.html#t:IPName">IPName</a> <a href="Name.html#t:Name">Name</a>)</li><li class="src short"><span class="keyword">type</span> <a href="#t:IfaceExport">IfaceExport</a> = <a href="Avail.html#t:AvailInfo">AvailInfo</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Warnings">Warnings</a> <ul class="subs"><li>= <a href="#v:NoWarnings">NoWarnings</a> </li><li>| <a href="#v:WarnAll">WarnAll</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a> </li><li>| <a href="#v:WarnSome">WarnSome</a> [(<a href="OccName.html#t:OccName">OccName</a>, <a href="HscTypes.html#t:WarningTxt">WarningTxt</a>)] </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:WarningTxt">WarningTxt</a> <ul class="subs"><li>= <a href="#v:WarningTxt">WarningTxt</a> [<a href="FastString.html#t:FastString">FastString</a>] </li><li>| <a href="#v:DeprecatedTxt">DeprecatedTxt</a> [<a href="FastString.html#t:FastString">FastString</a>] </li></ul></li><li class="src short"><a href="#v:plusWarns">plusWarns</a> :: <a href="HscTypes.html#t:Warnings">Warnings</a> -> <a href="HscTypes.html#t:Warnings">Warnings</a> -> <a href="HscTypes.html#t:Warnings">Warnings</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Linkable">Linkable</a> = <a href="#v:LM">LM</a> {<ul class="subs"><li><a href="#v:linkableTime">linkableTime</a> :: <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></li><li><a href="#v:linkableModule">linkableModule</a> :: <a href="Module.html#t:Module">Module</a></li><li><a href="#v:linkableUnlinked">linkableUnlinked</a> :: [<a href="HscTypes.html#t:Unlinked">Unlinked</a>]</li></ul>}</li><li class="src short"><a href="#v:isObjectLinkable">isObjectLinkable</a> :: <a href="HscTypes.html#t:Linkable">Linkable</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:linkableObjs">linkableObjs</a> :: <a href="HscTypes.html#t:Linkable">Linkable</a> -> [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:Unlinked">Unlinked</a> <ul class="subs"><li>= <a href="#v:DotO">DotO</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> </li><li>| <a href="#v:DotA">DotA</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> </li><li>| <a href="#v:DotDLL">DotDLL</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> </li><li>| <a href="#v:BCOs">BCOs</a> <a href="HscTypes.html#t:CompiledByteCode">CompiledByteCode</a> <a href="HscTypes.html#t:ModBreaks">ModBreaks</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:CompiledByteCode">CompiledByteCode</a> </li><li class="src short"><a href="#v:isObject">isObject</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:nameOfObject">nameOfObject</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:isInterpretable">isInterpretable</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:byteCodeOfObject">byteCodeOfObject</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="HscTypes.html#t:CompiledByteCode">CompiledByteCode</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:HpcInfo">HpcInfo</a> <ul class="subs"><li>= <a href="#v:HpcInfo">HpcInfo</a> { <ul class="subs"><li><a href="#v:hpcInfoTickCount">hpcInfoTickCount</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:hpcInfoHash">hpcInfoHash</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li></ul> }</li><li>| <a href="#v:NoHpcInfo">NoHpcInfo</a> { <ul class="subs"><li><a href="#v:hpcUsed">hpcUsed</a> :: <a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a></li></ul> }</li></ul></li><li class="src short"><a href="#v:emptyHpcInfo">emptyHpcInfo</a> :: <a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a> -> <a href="HscTypes.html#t:HpcInfo">HpcInfo</a></li><li class="src short"><a href="#v:isHpcUsed">isHpcUsed</a> :: <a href="HscTypes.html#t:HpcInfo">HpcInfo</a> -> <a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:AnyHpcUsage">AnyHpcUsage</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:ModBreaks">ModBreaks</a> = <a href="#v:ModBreaks">ModBreaks</a> {<ul class="subs"><li><a href="#v:modBreaks_flags">modBreaks_flags</a> :: <a href="BreakArray.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="HscTypes.html#t:BreakIndex">BreakIndex</a> <a href="SrcLoc.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="HscTypes.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="HscTypes.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"><a href="#v:emptyModBreaks">emptyModBreaks</a> :: <a href="HscTypes.html#t:ModBreaks">ModBreaks</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:VectInfo">VectInfo</a> = <a href="#v:VectInfo">VectInfo</a> {<ul class="subs"><li><a href="#v:vectInfoVar">vectInfoVar</a> :: <a href="VarEnv.html#t:VarEnv">VarEnv</a> (<a href="Var.html#t:Var">Var</a>, <a href="Var.html#t:Var">Var</a>)</li><li><a href="#v:vectInfoTyCon">vectInfoTyCon</a> :: <a href="NameEnv.html#t:NameEnv">NameEnv</a> (<a href="TyCon.html#t:TyCon">TyCon</a>, <a href="TyCon.html#t:TyCon">TyCon</a>)</li><li><a href="#v:vectInfoDataCon">vectInfoDataCon</a> :: <a href="NameEnv.html#t:NameEnv">NameEnv</a> (<a href="DataCon.html#t:DataCon">DataCon</a>, <a href="DataCon.html#t:DataCon">DataCon</a>)</li><li><a href="#v:vectInfoScalarVars">vectInfoScalarVars</a> :: <a href="VarSet.html#t:VarSet">VarSet</a></li><li><a href="#v:vectInfoScalarTyCons">vectInfoScalarTyCons</a> :: <a href="NameSet.html#t:NameSet">NameSet</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:IfaceVectInfo">IfaceVectInfo</a> = <a href="#v:IfaceVectInfo">IfaceVectInfo</a> {<ul class="subs"><li><a href="#v:ifaceVectInfoVar">ifaceVectInfoVar</a> :: [<a href="Name.html#t:Name">Name</a>]</li><li><a href="#v:ifaceVectInfoTyCon">ifaceVectInfoTyCon</a> :: [<a href="Name.html#t:Name">Name</a>]</li><li><a href="#v:ifaceVectInfoTyConReuse">ifaceVectInfoTyConReuse</a> :: [<a href="Name.html#t:Name">Name</a>]</li><li><a href="#v:ifaceVectInfoScalarVars">ifaceVectInfoScalarVars</a> :: [<a href="Name.html#t:Name">Name</a>]</li><li><a href="#v:ifaceVectInfoScalarTyCons">ifaceVectInfoScalarTyCons</a> :: [<a href="Name.html#t:Name">Name</a>]</li></ul>}</li><li class="src short"><a href="#v:noVectInfo">noVectInfo</a> :: <a href="HscTypes.html#t:VectInfo">VectInfo</a></li><li class="src short"><a href="#v:plusVectInfo">plusVectInfo</a> :: <a href="HscTypes.html#t:VectInfo">VectInfo</a> -> <a href="HscTypes.html#t:VectInfo">VectInfo</a> -> <a href="HscTypes.html#t:VectInfo">VectInfo</a></li><li class="src short"><a href="#v:noIfaceVectInfo">noIfaceVectInfo</a> :: <a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</a></li><li class="src short"><a href="#v:isNoIfaceVectInfo">isNoIfaceVectInfo</a> :: <a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</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:IfaceTrustInfo">IfaceTrustInfo</a> </li><li class="src short"><a href="#v:getSafeMode">getSafeMode</a> :: <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a> -> <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a></li><li class="src short"><a href="#v:setSafeMode">setSafeMode</a> :: <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a> -> <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></li><li class="src short"><a href="#v:noIfaceTrustInfo">noIfaceTrustInfo</a> :: <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></li><li class="src short"><a href="#v:trustInfoToNum">trustInfoToNum</a> :: <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a> -> <a href="../base-4.5.1.0/Data-Word.html#t:Word8">Word8</a></li><li class="src short"><a href="#v:numToTrustInfo">numToTrustInfo</a> :: <a href="../base-4.5.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:IsSafeImport">IsSafeImport</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:HsParsedModule">HsParsedModule</a> = <a href="#v:HsParsedModule">HsParsedModule</a> {<ul class="subs"><li><a href="#v:hpm_module">hpm_module</a> :: <a href="SrcLoc.html#t:Located">Located</a> (<a href="HsSyn.html#t:HsModule">HsModule</a> <a href="RdrName.html#t:RdrName">RdrName</a>)</li><li><a href="#v:hpm_src_files">hpm_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:SourceError">SourceError</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:GhcApiError">GhcApiError</a> </li><li class="src short"><a href="#v:mkSrcErr">mkSrcErr</a> :: <a href="ErrUtils.html#t:ErrorMessages">ErrorMessages</a> -> <a href="HscTypes.html#t:SourceError">SourceError</a></li><li class="src short"><a href="#v:srcErrorMessages">srcErrorMessages</a> :: <a href="HscTypes.html#t:SourceError">SourceError</a> -> <a href="ErrUtils.html#t:ErrorMessages">ErrorMessages</a></li><li class="src short"><a href="#v:mkApiErr">mkApiErr</a> :: <a href="Outputable.html#t:SDoc">SDoc</a> -> <a href="HscTypes.html#t:GhcApiError">GhcApiError</a></li><li class="src short"><a href="#v:throwOneError">throwOneError</a> :: <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m => <a href="ErrUtils.html#t:ErrMsg">ErrMsg</a> -> m ab</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:handleFlagWarnings">handleFlagWarnings</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> [<a href="SrcLoc.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> ()</li><li class="src short"><a href="#v:printOrThrowWarnings">printOrThrowWarnings</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="Bag.html#t:Bag">Bag</a> <a href="ErrUtils.html#t:WarnMsg">WarnMsg</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1 id="g:1">compilation state </h1><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 class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HscEnv" class="def">HscEnv</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:hsc_dflags" class="def">hsc_dflags</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a></dt><dd class="doc"><p>The dynamic flag settings </p></dd><dt class="src"><a name="v:hsc_targets" class="def">hsc_targets</a> :: [<a href="HscTypes.html#t:Target">Target</a>]</dt><dd class="doc"><p>The targets (or roots) of the current session </p></dd><dt class="src"><a name="v:hsc_mod_graph" class="def">hsc_mod_graph</a> :: <a href="HscTypes.html#t:ModuleGraph">ModuleGraph</a></dt><dd class="doc"><p>The module graph of the current session </p></dd><dt class="src"><a name="v:hsc_IC" class="def">hsc_IC</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></dt><dd class="doc"><p>The context for evaluating interactive statements </p></dd><dt class="src"><a name="v:hsc_HPT" class="def">hsc_HPT</a> :: <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></dt><dd class="doc"><p>The home package table describes already-compiled home-package modules, <em>excluding</em> the module we are compiling right now. (In one-shot mode the current module is the only home-package module, so hsc_HPT is empty. All other modules count as "external-package" modules. However, even in GHCi mode, hi-boot interfaces are demand-loaded into the external-package table.) </p><p><code><a href="HscTypes.html#v:hsc_HPT">hsc_HPT</a></code> is not mutable because we only demand-load external packages; the home package is eagerly loaded, module by module, by the compilation manager. </p><p>The HPT may contain modules compiled earlier by <code>--make</code> but not actually below the current module in the dependency graph. </p><p>(This changes a previous invariant: changed Jan 05.) </p></dd><dt class="src"><a name="v:hsc_EPS" class="def">hsc_EPS</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a>)</dt><dd class="doc"><p>Information about the currently loaded external packages. This is mutable because packages will be demand-loaded during a compilation run as required. </p></dd><dt class="src"><a name="v:hsc_NC" class="def">hsc_NC</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:NameCache">NameCache</a>)</dt><dd class="doc"><p>As with <code><a href="HscTypes.html#v:hsc_EPS">hsc_EPS</a></code>, this is side-effected by compiling to reflect sucking in interface files. They cache the state of external interface files, in effect. </p></dd><dt class="src"><a name="v:hsc_FC" class="def">hsc_FC</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:FinderCache">FinderCache</a>)</dt><dd class="doc"><p>The cached result of performing finding in the file system </p></dd><dt class="src"><a name="v:hsc_MLC" class="def">hsc_MLC</a> :: !(<a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:ModLocationCache">ModLocationCache</a>)</dt><dd class="doc"><p>This caches the location of modules, so we don't have to search the filesystem multiple times. See also <code><a href="HscTypes.html#v:hsc_FC">hsc_FC</a></code>. </p></dd><dt class="src"><a name="v:hsc_OptFuel" class="def">hsc_OptFuel</a> :: <a href="OptimizationFuel.html#t:OptFuelState">OptFuelState</a></dt><dd class="doc"><p>Settings to control the use of "optimization fuel": by limiting the number of transformations, we can use binary search to help find compiler bugs. </p></dd><dt class="src"><a name="v:hsc_type_env_var" class="def">hsc_type_env_var</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Module.html#t:Module">Module</a>, <a href="IOEnv.html#t:IORef">IORef</a> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a>)</dt><dd class="doc"><p>Used for one-shot compilation only, to initialise the <code>IfGblEnv</code>. See <code><a href="TcRnTypes.html#v:tcg_type_env_var">tcg_type_env_var</a></code> for <code><a href="TcRunTypes.html#t:TcGblEnv">TcGblEnv</a></code> </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:hscEPS" class="def">hscEPS</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a></p><div class="doc"><p>Retrieve the ExternalPackageState cache. </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:FinderCache" class="def">FinderCache</a> = <a href="Module.html#t:ModuleNameEnv">ModuleNameEnv</a> <a href="HscTypes.html#t:FindResult">FindResult</a></p><div class="doc"><p>The <code><a href="HscTypes.html#t:FinderCache">FinderCache</a></code> maps home module names to the result of searching for that module. It records the results of searching for modules along the search path. On <code>:load</code>, we flush the entire contents of this cache. </p><p>Although the <code>FinderCache</code> range is <code><a href="HscTypes.html#t:FindResult">FindResult</a></code> for convenience, in fact it will only ever contain <code><a href="HscTypes.html#v:Found">Found</a></code> or <code><a href="HscTypes.html#v:NotFound">NotFound</a></code> entries. </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FindResult" class="def">FindResult</a> </p><div class="doc"><p>The result of searching for an imported module. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Found" class="def">Found</a> <a href="Module.html#t:ModLocation">ModLocation</a> <a href="Module.html#t:Module">Module</a></td><td class="doc"><p>The module was found </p></td></tr><tr><td class="src"><a name="v:NoPackage" class="def">NoPackage</a> <a href="Module.html#t:PackageId">PackageId</a></td><td class="doc"><p>The requested package was not found </p></td></tr><tr><td class="src"><a name="v:FoundMultiple" class="def">FoundMultiple</a> [<a href="Module.html#t:PackageId">PackageId</a>]</td><td class="doc"><p>_Error_: both in multiple packages </p></td></tr><tr><td class="src"><a name="v:NotFound" class="def">NotFound</a></td><td class="doc"><p>Not found </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:fr_paths" class="def">fr_paths</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:fr_pkg" class="def">fr_pkg</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Module.html#t:PackageId">PackageId</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:fr_mods_hidden" class="def">fr_mods_hidden</a> :: [<a href="Module.html#t:PackageId">PackageId</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:fr_pkgs_hidden" class="def">fr_pkgs_hidden</a> :: [<a href="Module.html#t:PackageId">PackageId</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:fr_suggestions" class="def">fr_suggestions</a> :: [<a href="Module.html#t:Module">Module</a>]</dt><dd class="doc empty"> </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:ModLocationCache" class="def">ModLocationCache</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> <a href="Module.html#t:ModLocation">ModLocation</a></p><div class="doc"><p>Cache that remembers where we found a particular module. Contains both home modules and package modules. On <code>:load</code>, only home modules are purged from this cache. </p></div></div><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="HscTypes.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="HscTypes.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="Module.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="DriverPhases.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="HscTypes.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="HscTypes.html#t:TargetId">TargetId</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:pprTarget" class="def">pprTarget</a> :: <a href="HscTypes.html#t:Target">Target</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><div class="top"><p class="src"><a name="v:pprTargetId" class="def">pprTargetId</a> :: <a href="HscTypes.html#t:TargetId">TargetId</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:ModuleGraph" class="def">ModuleGraph</a> = [<a href="HscTypes.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"><a name="v:emptyMG" class="def">emptyMG</a> :: <a href="HscTypes.html#t:ModuleGraph">ModuleGraph</a></p></div><h1 id="g:2">Information about modules </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModDetails" class="def">ModDetails</a> </p><div class="doc"><p>The <code><a href="HscTypes.html#t:ModDetails">ModDetails</a></code> is essentially a cache for information in the <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> for home modules only. Information relating to packages will be loaded into global environments in <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:ModDetails" class="def">ModDetails</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:md_exports" class="def">md_exports</a> :: [<a href="Avail.html#t:AvailInfo">AvailInfo</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:md_types" class="def">md_types</a> :: !<a href="HscTypes.html#t:TypeEnv">TypeEnv</a></dt><dd class="doc"><p>Local type environment for this particular module </p></dd><dt class="src"><a name="v:md_insts" class="def">md_insts</a> :: ![<a href="InstEnv.html#t:Instance">Instance</a>]</dt><dd class="doc"><p><code><a href="Var.html#t:DFunId">DFunId</a></code>s for the instances in this module </p></dd><dt class="src"><a name="v:md_fam_insts" class="def">md_fam_insts</a> :: ![<a href="FamInstEnv.html#t:FamInst">FamInst</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:md_rules" class="def">md_rules</a> :: ![<a href="CoreSyn.html#t:CoreRule">CoreRule</a>]</dt><dd class="doc"><p>Domain may include <code><a href="Var.html#t:Id">Id</a></code>s from other modules </p></dd><dt class="src"><a name="v:md_anns" class="def">md_anns</a> :: ![<a href="Annotations.html#t:Annotation">Annotation</a>]</dt><dd class="doc"><p>Annotations present in this module: currently they only annotate things also declared in this module </p></dd><dt class="src"><a name="v:md_vect_info" class="def">md_vect_info</a> :: !<a href="HscTypes.html#t:VectInfo">VectInfo</a></dt><dd class="doc"><p>Module vectorisation information </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:emptyModDetails" class="def">emptyModDetails</a> :: <a href="HscTypes.html#t:ModDetails">ModDetails</a></p><div class="doc"><p>Constructs an empty ModDetails </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModGuts" class="def">ModGuts</a> </p><div class="doc"><p>A ModGuts is carried through the compiler, accumulating stuff as it goes There is only one ModGuts at any time, the one for the module being compiled right now. Once it is compiled, a <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> and <code><a href="HscTypes.html#t:ModDetails">ModDetails</a></code> are extracted and the ModGuts is discarded. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModGuts" class="def">ModGuts</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:mg_module" class="def">mg_module</a> :: !<a href="Module.html#t:Module">Module</a></dt><dd class="doc"><p>Module being compiled </p></dd><dt class="src"><a name="v:mg_boot" class="def">mg_boot</a> :: <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a></dt><dd class="doc"><p>Whether it's an hs-boot module </p></dd><dt class="src"><a name="v:mg_exports" class="def">mg_exports</a> :: ![<a href="Avail.html#t:AvailInfo">AvailInfo</a>]</dt><dd class="doc"><p>What it exports </p></dd><dt class="src"><a name="v:mg_deps" class="def">mg_deps</a> :: !<a href="HscTypes.html#t:Dependencies">Dependencies</a></dt><dd class="doc"><p>What it depends on, directly or otherwise </p></dd><dt class="src"><a name="v:mg_dir_imps" class="def">mg_dir_imps</a> :: !<a href="HscTypes.html#t:ImportedMods">ImportedMods</a></dt><dd class="doc"><p>Directly-imported modules; used to generate initialisation code </p></dd><dt class="src"><a name="v:mg_used_names" class="def">mg_used_names</a> :: !<a href="NameSet.html#t:NameSet">NameSet</a></dt><dd class="doc"><p>What the module needed (used in <code><a href="MkIface.html#v:mkIface">mkIface</a></code>) </p></dd><dt class="src"><a name="v:mg_used_th" class="def">mg_used_th</a> :: !<a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>Did we run a TH splice? </p></dd><dt class="src"><a name="v:mg_rdr_env" class="def">mg_rdr_env</a> :: !<a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></dt><dd class="doc"><p>Top-level lexical environment </p></dd><dt class="src"><a name="v:mg_fix_env" class="def">mg_fix_env</a> :: !<a href="HscTypes.html#t:FixityEnv">FixityEnv</a></dt><dd class="doc"><p>Fixities declared in this module ToDo: I'm unconvinced this is actually used anywhere </p></dd><dt class="src"><a name="v:mg_tcs" class="def">mg_tcs</a> :: ![<a href="TyCon.html#t:TyCon">TyCon</a>]</dt><dd class="doc"><p>TyCons declared in this module (includes TyCons for classes) </p></dd><dt class="src"><a name="v:mg_insts" class="def">mg_insts</a> :: ![<a href="InstEnv.html#t:Instance">Instance</a>]</dt><dd class="doc"><p>Class instances declared in this module </p></dd><dt class="src"><a name="v:mg_fam_insts" class="def">mg_fam_insts</a> :: ![<a href="FamInstEnv.html#t:FamInst">FamInst</a>]</dt><dd class="doc"><p>Family instances declared in this module </p></dd><dt class="src"><a name="v:mg_rules" class="def">mg_rules</a> :: ![<a href="CoreSyn.html#t:CoreRule">CoreRule</a>]</dt><dd class="doc"><p>Before the core pipeline starts, contains See Note [Overall plumbing for rules] in Rules.lhs </p></dd><dt class="src"><a name="v:mg_binds" class="def">mg_binds</a> :: !<a href="CoreSyn.html#t:CoreProgram">CoreProgram</a></dt><dd class="doc"><p>Bindings for this module </p></dd><dt class="src"><a name="v:mg_foreign" class="def">mg_foreign</a> :: !<a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a></dt><dd class="doc"><p>Foreign exports declared in this module </p></dd><dt class="src"><a name="v:mg_warns" class="def">mg_warns</a> :: !<a href="HscTypes.html#t:Warnings">Warnings</a></dt><dd class="doc"><p>Warnings declared in the module </p></dd><dt class="src"><a name="v:mg_anns" class="def">mg_anns</a> :: [<a href="Annotations.html#t:Annotation">Annotation</a>]</dt><dd class="doc"><p>Annotations declared in this module </p></dd><dt class="src"><a name="v:mg_hpc_info" class="def">mg_hpc_info</a> :: !<a href="HscTypes.html#t:HpcInfo">HpcInfo</a></dt><dd class="doc"><p>Coverage tick boxes in the module </p></dd><dt class="src"><a name="v:mg_modBreaks" class="def">mg_modBreaks</a> :: !<a href="HscTypes.html#t:ModBreaks">ModBreaks</a></dt><dd class="doc"><p>Breakpoints for the module </p></dd><dt class="src"><a name="v:mg_vect_decls" class="def">mg_vect_decls</a> :: ![<a href="CoreSyn.html#t:CoreVect">CoreVect</a>]</dt><dd class="doc"><p>Vectorisation declarations in this module (produced by desugarer & consumed by vectoriser) </p></dd><dt class="src"><a name="v:mg_vect_info" class="def">mg_vect_info</a> :: !<a href="HscTypes.html#t:VectInfo">VectInfo</a></dt><dd class="doc"><p>Pool of vectorised declarations in the module </p></dd><dt class="src"><a name="v:mg_inst_env" class="def">mg_inst_env</a> :: <a href="InstEnv.html#t:InstEnv">InstEnv</a></dt><dd class="doc"><p>Class instance environment from <em>home-package</em> modules (including this one); c.f. <code>tcg_inst_env</code> </p></dd><dt class="src"><a name="v:mg_fam_inst_env" class="def">mg_fam_inst_env</a> :: <a href="FamInstEnv.html#t:FamInstEnv">FamInstEnv</a></dt><dd class="doc"><p>Type-family instance enviroment for <em>home-package</em> modules (including this one); c.f. <code>tcg_fam_inst_env</code> </p></dd><dt class="src"><a name="v:mg_safe_haskell" class="def">mg_safe_haskell</a> :: <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a></dt><dd class="doc"><p>Safe Haskell mode </p></dd><dt class="src"><a name="v:mg_trust_pkg" class="def">mg_trust_pkg</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>Do we need to trust our own package for Safe Haskell? See Note [RnNames . Trust Own Package] </p></dd><dt class="src"><a name="v:mg_dependent_files" class="def">mg_dependent_files</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</dt><dd class="doc"><p>dependencies from addDependentFile </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:CgGuts" class="def">CgGuts</a> </p><div class="doc"><p>A restricted form of <code><a href="HscTypes.html#t:ModGuts">ModGuts</a></code> for code generation purposes </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CgGuts" class="def">CgGuts</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:cg_module" class="def">cg_module</a> :: !<a href="Module.html#t:Module">Module</a></dt><dd class="doc"><p>Module being compiled </p></dd><dt class="src"><a name="v:cg_tycons" class="def">cg_tycons</a> :: [<a href="TyCon.html#t:TyCon">TyCon</a>]</dt><dd class="doc"><p>Algebraic data types (including ones that started life as classes); generate constructors and info tables. Includes newtypes, just for the benefit of External Core </p></dd><dt class="src"><a name="v:cg_binds" class="def">cg_binds</a> :: <a href="CoreSyn.html#t:CoreProgram">CoreProgram</a></dt><dd class="doc"><p>The tidied main bindings, including previously-implicit bindings for record and class selectors, and data construtor wrappers. But *not* data constructor workers; reason: we we regard them as part of the code-gen of tycons </p></dd><dt class="src"><a name="v:cg_foreign" class="def">cg_foreign</a> :: !<a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a></dt><dd class="doc"><p>Foreign export stubs </p></dd><dt class="src"><a name="v:cg_dep_pkgs" class="def">cg_dep_pkgs</a> :: ![<a href="Module.html#t:PackageId">PackageId</a>]</dt><dd class="doc"><p>Dependent packages, used to generate #includes for C code gen </p></dd><dt class="src"><a name="v:cg_hpc_info" class="def">cg_hpc_info</a> :: !<a href="HscTypes.html#t:HpcInfo">HpcInfo</a></dt><dd class="doc"><p>Program coverage tick box information </p></dd><dt class="src"><a name="v:cg_modBreaks" class="def">cg_modBreaks</a> :: !<a href="HscTypes.html#t:ModBreaks">ModBreaks</a></dt><dd class="doc"><p>Module breakpoints </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:ForeignStubs" class="def">ForeignStubs</a> </p><div class="doc"><p>Foreign export stubs </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoStubs" class="def">NoStubs</a></td><td class="doc"><p>We don't have any stubs </p></td></tr><tr><td class="src"><a name="v:ForeignStubs" class="def">ForeignStubs</a> <a href="Outputable.html#t:SDoc">SDoc</a> <a href="Outputable.html#t:SDoc">SDoc</a></td><td class="doc"><p>There are some stubs. Parameters: </p><p>1) Header file prototypes for <a href="foreign exported.html">foreign exported</a> functions </p><p>2) C stubs to use when calling <a href="foreign exported.html">foreign exported</a> functions </p></td></tr></table></div></div><div class="top"><p class="src"><a name="v:appendStubC" class="def">appendStubC</a> :: <a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a> -> <a href="Outputable.html#t:SDoc">SDoc</a> -> <a href="HscTypes.html#t:ForeignStubs">ForeignStubs</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ImportedMods" class="def">ImportedMods</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> [<a href="HscTypes.html#t:ImportedModsVal">ImportedModsVal</a>]</p><div class="doc"><p>Records the modules directly imported by a module for extracting e.g. usage information </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ImportedModsVal" class="def">ImportedModsVal</a> = (<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>, <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a>, <a href="HscTypes.html#t:IsSafeImport">IsSafeImport</a>)</p></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="Module.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="HscTypes.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="Module.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="SrcLoc.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="RdrName.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="SrcLoc.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="RdrName.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="DynFlags.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="HscTypes.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_imps" class="def">ms_imps</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> [<a href="SrcLoc.html#t:Located">Located</a> (<a href="HsImpExp.html#t:ImportDecl">ImportDecl</a> <a href="RdrName.html#t:RdrName">RdrName</a>)]</p></div><div class="top"><p class="src"><a name="v:ms_mod_name" class="def">ms_mod_name</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="Module.html#t:ModuleName">ModuleName</a></p></div><div class="top"><p class="src"><a name="v:showModMsg" class="def">showModMsg</a> :: <a href="DynFlags.html#t:HscTarget">HscTarget</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="HscTypes.html#t:ModSummary">ModSummary</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:isBootSummary" class="def">isBootSummary</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Did this <code><a href="HscTypes.html#t:ModSummary">ModSummary</a></code> originate from a hs-boot file? </p></div></div><div class="top"><p class="src"><a name="v:msHsFilePath" class="def">msHsFilePath</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></p></div><div class="top"><p class="src"><a name="v:msHiFilePath" class="def">msHiFilePath</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></p></div><div class="top"><p class="src"><a name="v:msObjFilePath" class="def">msObjFilePath</a> :: <a href="HscTypes.html#t:ModSummary">ModSummary</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SourceModified" class="def">SourceModified</a> </p><div class="doc"><p>Indicates whether a given module's source has been modified since it was last compiled. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SourceModified" class="def">SourceModified</a></td><td class="doc"><p>the source has been modified </p></td></tr><tr><td class="src"><a name="v:SourceUnmodified" class="def">SourceUnmodified</a></td><td class="doc"><p>the source has not been modified. Compilation may or may not be necessary, depending on whether any dependencies have changed since we last compiled. </p></td></tr><tr><td class="src"><a name="v:SourceUnmodifiedAndStable" class="def">SourceUnmodifiedAndStable</a></td><td class="doc"><p>the source has not been modified, and furthermore all of its (transitive) dependencies are up to date; it definitely does not need to be recompiled. This is important for two reasons: (a) we can omit the version check in checkOldIface, and (b) if the module used TH splices we don't need to force recompilation. </p></td></tr></table></div></div><h1 id="g:3">Information about the module being compiled </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HscSource" class="def">HscSource</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HsSrcFile" class="def">HsSrcFile</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:HsBootFile" class="def">HsBootFile</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:ExtCoreFile" class="def">ExtCoreFile</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:HscSource" class="caption collapser" onclick="toggleSection('i:HscSource')">Instances</p><div id="section.i:HscSource" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="HscTypes.html#t:HscSource">HscSource</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="HscTypes.html#t:HscSource">HscSource</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="HscTypes.html#t:HscSource">HscSource</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:isHsBoot" class="def">isHsBoot</a> :: <a href="HscTypes.html#t:HscSource">HscSource</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:hscSourceString" class="def">hscSourceString</a> :: <a href="HscTypes.html#t:HscSource">HscSource</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p></div><h1 id="g:4">State relating to modules in this package </h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:HomePackageTable" class="def">HomePackageTable</a> = <a href="Module.html#t:ModuleNameEnv">ModuleNameEnv</a> <a href="HscTypes.html#t:HomeModInfo">HomeModInfo</a></p><div class="doc"><p>Helps us find information about modules in the home package </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HomeModInfo" class="def">HomeModInfo</a> </p><div class="doc"><p>Information about modules in the package being compiled </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HomeModInfo" class="def">HomeModInfo</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:hm_iface" class="def">hm_iface</a> :: !<a href="HscTypes.html#t:ModIface">ModIface</a></dt><dd class="doc"><p>The basic loaded interface file: every loaded module has one of these, even if it is imported from another package </p></dd><dt class="src"><a name="v:hm_details" class="def">hm_details</a> :: !<a href="HscTypes.html#t:ModDetails">ModDetails</a></dt><dd class="doc"><p>Extra information that has been created from the <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> for the module, typically during typechecking </p></dd><dt class="src"><a name="v:hm_linkable" class="def">hm_linkable</a> :: !(<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:Linkable">Linkable</a>)</dt><dd class="doc"><p>The actual artifact we would like to link to access things in this module. </p><p><code><a href="HscTypes.html#v:hm_linkable">hm_linkable</a></code> might be Nothing: </p><ol><li> If this is an .hs-boot module </li><li> Temporarily during compilation if we pruned away the old linkable because it was out of date. </li></ol><p>After a complete compilation (<code><a href="GHC.html#v:load">load</a></code>), all <code><a href="HscTypes.html#v:hm_linkable">hm_linkable</a></code> fields in the <code><a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></code> will be <code>Just</code>. </p><p>When re-linking a module (<code><a href="HscMain.html#t:HscNoRecomp">HscNoRecomp</a></code>), we construct the <code><a href="HscTypes.html#t:HomeModInfo">HomeModInfo</a></code> by building a new <code><a href="HscTypes.html#t:ModDetails">ModDetails</a></code> from the old <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> (only). </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:emptyHomePackageTable" class="def">emptyHomePackageTable</a> :: <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></p><div class="doc"><p>Constructs an empty HomePackageTable </p></div></div><div class="top"><p class="src"><a name="v:hptInstances" class="def">hptInstances</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> (<a href="Module.html#t:ModuleName">ModuleName</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>) -> ([<a href="InstEnv.html#t:Instance">Instance</a>], [<a href="FamInstEnv.html#t:FamInst">FamInst</a>])</p><div class="doc"><p>Find all the instance declarations (of classes and families) that are in modules imported by this one, directly or indirectly, and are in the Home Package Table. This ensures that we don't see instances from modules <code>--make</code> compiled before this one, but which are not below this one. </p></div></div><div class="top"><p class="src"><a name="v:hptRules" class="def">hptRules</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> [(<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a>)] -> [<a href="CoreSyn.html#t:CoreRule">CoreRule</a>]</p><div class="doc"><p>Get rules from modules <a href="below.html">below</a> this one (in the dependency sense) </p></div></div><div class="top"><p class="src"><a name="v:hptVectInfo" class="def">hptVectInfo</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="HscTypes.html#t:VectInfo">VectInfo</a></p><div class="doc"><p>Get the combined VectInfo of all modules in the home package table. In contrast to instances and rules, we don't care whether the modules are <a href="below.html">below</a> us in the dependency sense. The VectInfo of those modules not <a href="below.html">below</a> us does not affect the compilation of the current module. </p></div></div><div class="top"><p class="src"><a name="v:hptObjs" class="def">hptObjs</a> :: <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a> -> [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</p></div><h1 id="g:5">State relating to known packages </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ExternalPackageState" class="def">ExternalPackageState</a> </p><div class="doc"><p>Information about other packages that we have slurped in by reading their interface files </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EPS" class="def">EPS</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:eps_is_boot" class="def">eps_is_boot</a> :: !(<a href="Module.html#t:ModuleNameEnv">ModuleNameEnv</a> (<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a>))</dt><dd class="doc"><p>In OneShot mode (only), home-package modules accumulate in the external package state, and are sucked in lazily. For these home-pkg modules (only) we need to record which are boot modules. We set this field after loading all the explicitly-imported interfaces, but before doing anything else </p><p>The <code><a href="Module.html#t:ModuleName">ModuleName</a></code> part is not necessary, but it's useful for debug prints, and it's convenient because this field comes direct from <code><a href="TcRnTypes.html#v:imp_dep_mods">imp_dep_mods</a></code> </p></dd><dt class="src"><a name="v:eps_PIT" class="def">eps_PIT</a> :: !<a href="HscTypes.html#t:PackageIfaceTable">PackageIfaceTable</a></dt><dd class="doc"><p>The <code><a href="HscTypes.html#t:ModIface">ModIface</a></code>s for modules in external packages whose interfaces we have opened. The declarations in these interface files are held in the <code>eps_decls</code>, <code><a href="HscTypes.html#v:eps_inst_env">eps_inst_env</a></code>, <code><a href="HscTypes.html#v:eps_fam_inst_env">eps_fam_inst_env</a></code> and <code>eps_rules</code> fields of this record, not in the <code><a href="HscTypes.html#v:mi_decls">mi_decls</a></code> fields of the interface we have sucked in. </p><p>What <em>is</em> in the PIT is: </p><ul><li> The Module </li><li> Fingerprint info </li><li> Its exports </li><li> Fixities </li><li> Deprecations and warnings </li></ul></dd><dt class="src"><a name="v:eps_PTE" class="def">eps_PTE</a> :: !<a href="HscTypes.html#t:PackageTypeEnv">PackageTypeEnv</a></dt><dd class="doc"><p>Result of typechecking all the external package interface files we have sucked in. The domain of the mapping is external-package modules </p></dd><dt class="src"><a name="v:eps_inst_env" class="def">eps_inst_env</a> :: !<a href="HscTypes.html#t:PackageInstEnv">PackageInstEnv</a></dt><dd class="doc"><p>The total <code><a href="InstEnv.html#t:InstEnv">InstEnv</a></code> accumulated from all the external-package modules </p></dd><dt class="src"><a name="v:eps_fam_inst_env" class="def">eps_fam_inst_env</a> :: !PackageFamInstEnv</dt><dd class="doc"><p>The total <code><a href="FamInstEnv.html#t:FamInstEnv">FamInstEnv</a></code> accumulated from all the external-package modules </p></dd><dt class="src"><a name="v:eps_rule_base" class="def">eps_rule_base</a> :: !<a href="HscTypes.html#t:PackageRuleBase">PackageRuleBase</a></dt><dd class="doc"><p>The total <code>RuleEnv</code> accumulated from all the external-package modules </p></dd><dt class="src"><a name="v:eps_vect_info" class="def">eps_vect_info</a> :: !PackageVectInfo</dt><dd class="doc"><p>The total <code><a href="HscTypes.html#t:VectInfo">VectInfo</a></code> accumulated from all the external-package modules </p></dd><dt class="src"><a name="v:eps_ann_env" class="def">eps_ann_env</a> :: !PackageAnnEnv</dt><dd class="doc"><p>The total <code><a href="Annotations.html#t:AnnEnv">AnnEnv</a></code> accumulated from all the external-package modules </p></dd><dt class="src"><a name="v:eps_mod_fam_inst_env" class="def">eps_mod_fam_inst_env</a> :: !(<a href="Module.html#t:ModuleEnv">ModuleEnv</a> <a href="FamInstEnv.html#t:FamInstEnv">FamInstEnv</a>)</dt><dd class="doc"><p>The family instances accumulated from external packages, keyed off the module that declared them </p></dd><dt class="src"><a name="v:eps_stats" class="def">eps_stats</a> :: !<a href="HscTypes.html#t:EpsStats">EpsStats</a></dt><dd class="doc"><p>Stastics about what was loaded from external packages </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:EpsStats" class="def">EpsStats</a> </p><div class="doc"><p>Accumulated statistics about what we are putting into the <code><a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a></code>. "In" means stuff that is just <em>read</em> from interface files, "Out" means actually sucked in and type-checked </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EpsStats" class="def">EpsStats</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:n_ifaces_in" class="def">n_ifaces_in</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:n_decls_in" class="def">n_decls_in</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:n_decls_out" class="def">n_decls_out</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:n_rules_in" class="def">n_rules_in</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:n_rules_out" class="def">n_rules_out</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:n_insts_in" class="def">n_insts_in</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:n_insts_out" class="def">n_insts_out</a> :: !<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:addEpsInStats" class="def">addEpsInStats</a> :: <a href="HscTypes.html#t:EpsStats">EpsStats</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-Int.html#t:Int">Int</a> -> <a href="HscTypes.html#t:EpsStats">EpsStats</a></p><div class="doc"><p>Add stats for one newly-read interface </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PackageTypeEnv" class="def">PackageTypeEnv</a> = <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PackageIfaceTable" class="def">PackageIfaceTable</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> <a href="HscTypes.html#t:ModIface">ModIface</a></p><div class="doc"><p>Helps us find information about modules in the imported packages </p></div></div><div class="top"><p class="src"><a name="v:emptyPackageIfaceTable" class="def">emptyPackageIfaceTable</a> :: <a href="HscTypes.html#t:PackageIfaceTable">PackageIfaceTable</a></p><div class="doc"><p>Constructs an empty PackageIfaceTable </p></div></div><div class="top"><p class="src"><a name="v:lookupIfaceByModule" class="def">lookupIfaceByModule</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a> -> <a href="HscTypes.html#t:PackageIfaceTable">PackageIfaceTable</a> -> <a href="Module.html#t:Module">Module</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModIface">ModIface</a></p><div class="doc"><p>Find the <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> for a <code><a href="Module.html#t:Module">Module</a></code>, searching in both the loaded home and external package module information </p></div></div><div class="top"><p class="src"><a name="v:emptyModIface" class="def">emptyModIface</a> :: <a href="Module.html#t:Module">Module</a> -> <a href="HscTypes.html#t:ModIface">ModIface</a></p><div class="doc"><p>Constructs an empty ModIface </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PackageInstEnv" class="def">PackageInstEnv</a> = <a href="InstEnv.html#t:InstEnv">InstEnv</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PackageRuleBase" class="def">PackageRuleBase</a> = <a href="Rules.html#t:RuleBase">RuleBase</a></p></div><h1 id="g:6">Annotations </h1><div class="top"><p class="src"><a name="v:prepareAnnotations" class="def">prepareAnnotations</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModGuts">ModGuts</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Annotations.html#t:AnnEnv">AnnEnv</a></p><div class="doc"><p>Deal with gathering annotations in from all possible places and combining them into a single <code><a href="Annotations.html#t:AnnEnv">AnnEnv</a></code> </p></div></div><h1 id="g:7">Interactive context </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:InteractiveContext" class="def">InteractiveContext</a> </p><div class="doc"><p>Interactive context, recording information about the state of the context in which statements are executed in a GHC session. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InteractiveContext" class="def">InteractiveContext</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:ic_imports" class="def">ic_imports</a> :: [<a href="HscTypes.html#t:InteractiveImport">InteractiveImport</a>]</dt><dd class="doc"><p>The GHCi context is extended with these imports </p><p>This field is only stored here so that the client can retrieve it with GHC.getContext. GHC itself doesn't use it, but does reset it to empty sometimes (such as before a GHC.load). The context is set with GHC.setContext. </p></dd><dt class="src"><a name="v:ic_rn_gbl_env" class="def">ic_rn_gbl_env</a> :: <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></dt><dd class="doc"><p>The cached <code><a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></code>, built by <code><a href="InteractiveEval.html#v:setContext">setContext</a></code> and updated regularly </p></dd><dt class="src"><a name="v:ic_tythings" class="def">ic_tythings</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>]</dt><dd class="doc"><p>TyThings defined by the user, in reverse order of definition. </p></dd><dt class="src"><a name="v:ic_sys_vars" class="def">ic_sys_vars</a> :: [<a href="Var.html#t:Id">Id</a>]</dt><dd class="doc"><p>Variables defined automatically by the system (e.g. record field selectors). See Notes [ic_sys_vars] </p></dd><dt class="src"><a name="v:ic_instances" class="def">ic_instances</a> :: ([<a href="InstEnv.html#t:Instance">Instance</a>], [<a href="FamInstEnv.html#t:FamInst">FamInst</a>])</dt><dd class="doc"><p>All instances and family instances created during this session. These are grabbed en masse after each update to be sure that proper overlapping is retained. That is, rather than re-check the overlapping each time we update the context, we just take the results from the instance code that already does that. </p></dd><dt class="src"><a name="v:ic_resume" class="def">ic_resume</a> :: [<a href="InteractiveEval.html#t:Resume">Resume</a>]</dt><dd class="doc"><p>The stack of breakpoint contexts </p></dd><dt class="src"><a name="v:ic_cwd" class="def">ic_cwd</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></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:emptyInteractiveContext" class="def">emptyInteractiveContext</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></p><div class="doc"><p>Constructs an empty InteractiveContext. </p></div></div><div class="top"><p class="src"><a name="v:icPrintUnqual" class="def">icPrintUnqual</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> <a href="Outputable.html#t:PrintUnqualified">PrintUnqualified</a></p><div class="doc"><p>Get the PrintUnqualified function based on the flags and this InteractiveContext </p></div></div><div class="top"><p class="src"><a name="v:icInScopeTTs" class="def">icInScopeTTs</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</p><div class="doc"><p>This function returns the list of visible TyThings (useful for e.g. showBindings) </p></div></div><div class="top"><p class="src"><a name="v:icPlusGblRdrEnv" class="def">icPlusGblRdrEnv</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a> -> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></p><div class="doc"><p>Add TyThings to the GlobalRdrEnv, earlier ones in the list shadowing later ones, and shadowing existing entries in the GlobalRdrEnv. </p></div></div><div class="top"><p class="src"><a name="v:extendInteractiveContext" class="def">extendInteractiveContext</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></p><div class="doc"><p>This function is called with new TyThings recently defined to update the InteractiveContext to include them. Ids are easily removed when shadowed, but Classes and TyCons are not. Some work could be done to determine whether they are entirely shadowed, but as you could still have references to them (e.g. instances for classes or values of the type for TyCons), it's not clear whether removing them is even the appropriate behavior. </p></div></div><div class="top"><p class="src"><a name="v:substInteractiveContext" class="def">substInteractiveContext</a> :: <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a> -> <a href="Type.html#t:TvSubst">TvSubst</a> -> <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a></p></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="RdrName.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="Module.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="HscTypes.html#t:InteractiveImport">InteractiveImport</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkPrintUnqualified" class="def">mkPrintUnqualified</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a> -> <a href="Outputable.html#t:PrintUnqualified">PrintUnqualified</a></p><div class="doc"><p>Creates some functions that work out the best ways to format names for the user according to a set of heuristics </p></div></div><div class="top"><p class="src"><a name="v:pprModulePrefix" class="def">pprModulePrefix</a> :: <a href="Outputable.html#t:PprStyle">PprStyle</a> -> <a href="Module.html#t:Module">Module</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="Outputable.html#t:SDoc">SDoc</a></p></div><h1 id="g:8">Interfaces </h1><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="HscTypes.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="HscTypes.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="HscTypes.html#t:ModIface">ModIface</a></code>. </p><p>When we read an interface file, we also construct a <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> from it, except that we explicitly make the <code><a href="HscTypes.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="Module.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="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></dt><dd class="doc"><p>Cached lookup for <code><a href="HscTypes.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="HscTypes.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="HscTypes.html#v:mi_decls">mi_decls</a></code>. The <code>Nothing</code> in <code><a href="HscTypes.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="HscTypes.html#t:ModIface">ModIface</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkIfaceWarnCache" class="def">mkIfaceWarnCache</a> :: <a href="HscTypes.html#t:Warnings">Warnings</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></p><div class="doc"><p>Constructs the cache for the <code><a href="HscTypes.html#v:mi_warn_fn">mi_warn_fn</a></code> field of a <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> </p></div></div><div class="top"><p class="src"><a name="v:mkIfaceHashCache" class="def">mkIfaceHashCache</a> :: [(<a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>, <a href="IfaceSyn.html#t:IfaceDecl">IfaceDecl</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>)</p><div class="doc"><p>Constructs cache for the <code><a href="HscTypes.html#v:mi_hash_fn">mi_hash_fn</a></code> field of a <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> </p></div></div><div class="top"><p class="src"><a name="v:mkIfaceFixCache" class="def">mkIfaceFixCache</a> :: [(<a href="OccName.html#t:OccName">OccName</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>)] -> <a href="OccName.html#t:OccName">OccName</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a></p><div class="doc"><p>Creates cached lookup for the <code><a href="HscTypes.html#v:mi_fix_fn">mi_fix_fn</a></code> field of <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> </p></div></div><div class="top"><p class="src"><a name="v:emptyIfaceWarnCache" class="def">emptyIfaceWarnCache</a> :: <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></p></div><h1 id="g:9">Fixity </h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:FixityEnv" class="def">FixityEnv</a> = <a href="NameEnv.html#t:NameEnv">NameEnv</a> <a href="HscTypes.html#t:FixItem">FixItem</a></p><div class="doc"><p>Fixity environment mapping names to their fixities </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FixItem" class="def">FixItem</a> </p><div class="doc"><p>Fixity information for an <code><a href="Name.html#t:Name">Name</a></code>. We keep the OccName in the range so that we can generate an interface from it </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FixItem" class="def">FixItem</a> <a href="OccName.html#t:OccName">OccName</a> <a href="BasicTypes.html#t:Fixity">Fixity</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:FixItem" class="caption collapser" onclick="toggleSection('i:FixItem')">Instances</p><div id="section.i:FixItem" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:FixItem">FixItem</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:lookupFixity" class="def">lookupFixity</a> :: <a href="HscTypes.html#t:FixityEnv">FixityEnv</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="BasicTypes.html#t:Fixity">Fixity</a></p></div><div class="top"><p class="src"><a name="v:emptyFixityEnv" class="def">emptyFixityEnv</a> :: <a href="HscTypes.html#t:FixityEnv">FixityEnv</a></p></div><h1 id="g:10">TyThings and type environments </h1><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="Var.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="DataCon.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="TyCon.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="HscTypes.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="HscTypes.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="HscTypes.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Name.html#t:NamedThing">NamedThing</a> <a href="HscTypes.html#t:TyThing">TyThing</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:tyThingAvailInfo" class="def">tyThingAvailInfo</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="Avail.html#t:AvailInfo">AvailInfo</a></p><div class="doc"><p>The Names that a TyThing should bring into scope. Used to build the GlobalRdrEnv for the InteractiveContext. </p></div></div><div class="top"><p class="src"><a name="v:tyThingTyCon" class="def">tyThingTyCon</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="TyCon.html#t:TyCon">TyCon</a></p><div class="doc"><p>Get the <code><a href="TyCon.html#t:TyCon">TyCon</a></code> from a <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> if it is a type constructor thing. Panics otherwise </p></div></div><div class="top"><p class="src"><a name="v:tyThingDataCon" class="def">tyThingDataCon</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="DataCon.html#t:DataCon">DataCon</a></p><div class="doc"><p>Get the <code><a href="DataCon.html#t:DataCon">DataCon</a></code> from a <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> if it is a data constructor thing. Panics otherwise </p></div></div><div class="top"><p class="src"><a name="v:tyThingId" class="def">tyThingId</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="Var.html#t:Id">Id</a></p><div class="doc"><p>Get the <code><a href="Var.html#t:Id">Id</a></code> from a <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> if it is a id *or* data constructor thing. Panics otherwise </p></div></div><div class="top"><p class="src"><a name="v:tyThingCoAxiom" class="def">tyThingCoAxiom</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="TyCon.html#t:CoAxiom">CoAxiom</a></p><div class="doc"><p>Get the <code><a href="TyCon.html#t:CoAxiom">CoAxiom</a></code> from a <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> if it is a coercion axiom thing. Panics otherwise </p></div></div><div class="top"><p class="src"><a name="v:tyThingParent_maybe" class="def">tyThingParent_maybe</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:TyThing">TyThing</a></p><div class="doc"><p>tyThingParent_maybe x returns (Just p) when pprTyThingInContext sould print a declaration for p (albeit with some <a href="---.html">...</a> in it) when asked to show x It returns the *immediate* parent. So a datacon returns its tycon but the tycon could be the associated type of a class, so it in turn might have a parent. </p></div></div><div class="top"><p class="src"><a name="v:tyThingsTyVars" class="def">tyThingsTyVars</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="VarSet.html#t:TyVarSet">TyVarSet</a></p></div><div class="top"><p class="src"><a name="v:implicitTyThings" class="def">implicitTyThings</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</p><div class="doc"><p>Determine the <code><a href="HscTypes.html#t:TyThing">TyThing</a></code>s brought into scope by another <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> <em>other</em> than itself. For example, Id's don't have any implicit TyThings as they just bring themselves into scope, but classes bring their dictionary datatype, type constructor and some selector functions into scope, just for a start! </p></div></div><div class="top"><p class="src"><a name="v:implicitTyConThings" class="def">implicitTyConThings</a> :: <a href="TyCon.html#t:TyCon">TyCon</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</p></div><div class="top"><p class="src"><a name="v:implicitClassThings" class="def">implicitClassThings</a> :: <a href="Class.html#t:Class">Class</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</p></div><div class="top"><p class="src"><a name="v:isImplicitTyThing" class="def">isImplicitTyThing</a> :: <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Returns <code>True</code> if there should be no interface-file declaration for this thing on its own: either it is built-in, or it is part of some other declaration, or it is generated implicitly by some other declaration. </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TypeEnv" class="def">TypeEnv</a> = <a href="NameEnv.html#t:NameEnv">NameEnv</a> <a href="HscTypes.html#t:TyThing">TyThing</a></p><div class="doc"><p>A map from <code><a href="Name.html#t:Name">Name</a></code>s to <code><a href="HscTypes.html#t:TyThing">TyThing</a></code>s, constructed by typechecking local declarations or interface files </p></div></div><div class="top"><p class="src"><a name="v:lookupType" class="def">lookupType</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a> -> <a href="HscTypes.html#t:PackageTypeEnv">PackageTypeEnv</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:TyThing">TyThing</a></p><div class="doc"><p>Find the <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> for the given <code><a href="Name.html#t:Name">Name</a></code> by using all the resources at our disposal: the compiled modules in the <code><a href="HscTypes.html#t:HomePackageTable">HomePackageTable</a></code> and the compiled modules in other packages that live in <code><a href="HscTypes.html#t:PackageTypeEnv">PackageTypeEnv</a></code>. Note that this does NOT look up the <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> in the module being compiled: you have to do that yourself, if desired </p></div></div><div class="top"><p class="src"><a name="v:lookupTypeHscEnv" class="def">lookupTypeHscEnv</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -> <a href="Name.html#t:Name">Name</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="HscTypes.html#t:TyThing">TyThing</a>)</p><div class="doc"><p>As <code><a href="HscTypes.html#v:lookupType">lookupType</a></code>, but with a marginally easier-to-use interface if you have a <code><a href="HscTypes.html#t:HscEnv">HscEnv</a></code> </p></div></div><div class="top"><p class="src"><a name="v:mkTypeEnv" class="def">mkTypeEnv</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:emptyTypeEnv" class="def">emptyTypeEnv</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:typeEnvFromEntities" class="def">typeEnvFromEntities</a> :: [<a href="Var.html#t:Id">Id</a>] -> [<a href="TyCon.html#t:TyCon">TyCon</a>] -> [<a href="FamInstEnv.html#t:FamInst">FamInst</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:mkTypeEnvWithImplicits" class="def">mkTypeEnvWithImplicits</a> :: [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:extendTypeEnv" class="def">extendTypeEnv</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> <a href="HscTypes.html#t:TyThing">TyThing</a> -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:extendTypeEnvList" class="def">extendTypeEnvList</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:extendTypeEnvWithIds" class="def">extendTypeEnvWithIds</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="Var.html#t:Id">Id</a>] -> <a href="HscTypes.html#t:TypeEnv">TypeEnv</a></p></div><div class="top"><p class="src"><a name="v:lookupTypeEnv" class="def">lookupTypeEnv</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> <a href="Name.html#t:Name">Name</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:TyThing">TyThing</a></p></div><div class="top"><p class="src"><a name="v:typeEnvElts" class="def">typeEnvElts</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="HscTypes.html#t:TyThing">TyThing</a>]</p></div><div class="top"><p class="src"><a name="v:typeEnvTyCons" class="def">typeEnvTyCons</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="TyCon.html#t:TyCon">TyCon</a>]</p></div><div class="top"><p class="src"><a name="v:typeEnvIds" class="def">typeEnvIds</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="Var.html#t:Id">Id</a>]</p></div><div class="top"><p class="src"><a name="v:typeEnvDataCons" class="def">typeEnvDataCons</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="DataCon.html#t:DataCon">DataCon</a>]</p></div><div class="top"><p class="src"><a name="v:typeEnvCoAxioms" class="def">typeEnvCoAxioms</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="TyCon.html#t:CoAxiom">CoAxiom</a>]</p></div><div class="top"><p class="src"><a name="v:typeEnvClasses" class="def">typeEnvClasses</a> :: <a href="HscTypes.html#t:TypeEnv">TypeEnv</a> -> [<a href="Class.html#t:Class">Class</a>]</p></div><h1 id="g:11">MonadThings </h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a name="t:MonadThings" class="def">MonadThings</a> m <span class="keyword">where</span></p><div class="doc"><p>Class that abstracts out the common ability of the monads in GHC to lookup a <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> in the monadic environment by <code><a href="Name.html#t:Name">Name</a></code>. Provides a number of related convenience functions for accessing particular kinds of <code><a href="HscTypes.html#t:TyThing">TyThing</a></code> </p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:lookupThing" class="def">lookupThing</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="HscTypes.html#t:TyThing">TyThing</a></p><p class="src"><a name="v:lookupId" class="def">lookupId</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="Var.html#t:Id">Id</a></p><p class="src"><a name="v:lookupDataCon" class="def">lookupDataCon</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="DataCon.html#t:DataCon">DataCon</a></p><p class="src"><a name="v:lookupTyCon" class="def">lookupTyCon</a> :: <a href="Name.html#t:Name">Name</a> -> m <a href="TyCon.html#t:TyCon">TyCon</a></p></div><div class="subs instances"><p id="control.i:MonadThings" class="caption collapser" onclick="toggleSection('i:MonadThings')">Instances</p><div id="section.i:MonadThings" class="show"><table><tr><td class="src"><a href="HscTypes.html#t:MonadThings">MonadThings</a> <a href="CoreMonad.html#t:CoreM">CoreM</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="HscTypes.html#t:MonadThings">MonadThings</a> (<a href="IOEnv.html#t:IOEnv">IOEnv</a> (<a href="TcRnTypes.html#t:Env">Env</a> <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> <a href="TcRnTypes.html#t:TcLclEnv">TcLclEnv</a>))</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="HscTypes.html#t:MonadThings">MonadThings</a> (<a href="IOEnv.html#t:IOEnv">IOEnv</a> (<a href="TcRnTypes.html#t:Env">Env</a> DsGblEnv DsLclEnv))</td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:12">Information on imports and exports </h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:WhetherHasOrphans" class="def">WhetherHasOrphans</a> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Records whether a module has orphans. An "orphan" is one of: </p><ul><li> An instance declaration in a module other than the definition module for one of the type constructors or classes in the instance head </li><li> A transformation rule in a module other than the one defining the function in the head of the rule </li><li> A vectorisation pragma </li></ul></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IsBootInterface" class="def">IsBootInterface</a> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Did this module originate from a *-boot file? </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Usage" class="def">Usage</a> </p><div class="doc"><p>Records modules that we depend on by making a direct import from </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:UsagePackageModule" class="def">UsagePackageModule</a></td><td class="doc"><p>Module from another package </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:usg_mod" class="def">usg_mod</a> :: <a href="Module.html#t:Module">Module</a></dt><dd class="doc"><p>External package module depended on </p></dd><dt class="src"><a name="v:usg_mod_hash" class="def">usg_mod_hash</a> :: <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Cached module fingerprint </p><p>Cached module fingerprint </p></dd><dt class="src"><a name="v:usg_safe" class="def">usg_safe</a> :: <a href="HscTypes.html#t:IsSafeImport">IsSafeImport</a></dt><dd class="doc"><p>Was this module imported as a safe import </p><p>Was this module imported as a safe import </p></dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:UsageHomeModule" class="def">UsageHomeModule</a></td><td class="doc"><p>Module from the current package </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:usg_mod_name" class="def">usg_mod_name</a> :: <a href="Module.html#t:ModuleName">ModuleName</a></dt><dd class="doc"><p>Name of the module </p></dd><dt class="src"><a name="v:usg_mod_hash" class="def">usg_mod_hash</a> :: <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Cached module fingerprint </p><p>Cached module fingerprint </p></dd><dt class="src"><a name="v:usg_entities" class="def">usg_entities</a> :: [(<a href="OccName.html#t:OccName">OccName</a>, <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a>)]</dt><dd class="doc"><p>Entities we depend on, sorted by occurrence name and fingerprinted. NB: usages are for parent names only, e.g. type constructors but not the associated data constructors. </p></dd><dt class="src"><a name="v:usg_exports" class="def">usg_exports</a> :: <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Fingerprint.html#t:Fingerprint">Fingerprint</a></dt><dd class="doc"><p>Fingerprint for the export list we used to depend on this module, if we depend on the export list </p></dd><dt class="src"><a name="v:usg_safe" class="def">usg_safe</a> :: <a href="HscTypes.html#t:IsSafeImport">IsSafeImport</a></dt><dd class="doc"><p>Was this module imported as a safe import </p><p>Was this module imported as a safe import </p></dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:UsageFile" class="def">UsageFile</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:usg_file_path" class="def">usg_file_path</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:usg_mtime" class="def">usg_mtime</a> :: <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></dt><dd class="doc"><p>External file dependency. From a CPP #include or TH addDependentFile. Should be absolute. </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Usage" class="caption collapser" onclick="toggleSection('i:Usage')">Instances</p><div id="section.i:Usage" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="HscTypes.html#t:Usage">Usage</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="HscTypes.html#t:Usage">Usage</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:Dependencies" class="def">Dependencies</a> </p><div class="doc"><p>Dependency information about modules and packages below this one in the import hierarchy. </p><p>Invariant: the dependencies of a module <code>M</code> never includes <code>M</code>. </p><p>Invariant: none of the lists contain duplicates. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Deps" class="def">Deps</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:dep_mods" class="def">dep_mods</a> :: [(<a href="Module.html#t:ModuleName">ModuleName</a>, <a href="HscTypes.html#t:IsBootInterface">IsBootInterface</a>)]</dt><dd class="doc"><p>Home-package module dependencies </p></dd><dt class="src"><a name="v:dep_pkgs" class="def">dep_pkgs</a> :: [(<a href="Module.html#t:PackageId">PackageId</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)]</dt><dd class="doc"><p>External package dependencies. The bool indicates if the package is required to be trusted when the module is imported as a safe import (Safe Haskell). See Note [RnNames . Tracking Trust Transitively] </p></dd><dt class="src"><a name="v:dep_orphs" class="def">dep_orphs</a> :: [<a href="Module.html#t:Module">Module</a>]</dt><dd class="doc"><p>Orphan modules (whether home or external pkg), *not* including family instance orphans as they are anyway included in <code><a href="HscTypes.html#v:dep_finsts">dep_finsts</a></code> </p></dd><dt class="src"><a name="v:dep_finsts" class="def">dep_finsts</a> :: [<a href="Module.html#t:Module">Module</a>]</dt><dd class="doc"><p>Modules that contain family instances (whether the instances are from the home or an external package) </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Dependencies" class="caption collapser" onclick="toggleSection('i:Dependencies')">Instances</p><div id="section.i:Dependencies" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="HscTypes.html#t:Dependencies">Dependencies</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="HscTypes.html#t:Dependencies">Dependencies</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:noDependencies" class="def">noDependencies</a> :: <a href="HscTypes.html#t:Dependencies">Dependencies</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:NameCache" class="def">NameCache</a> </p><div class="doc"><p>The NameCache makes sure that there is just one Unique assigned for each original name; i.e. (module-name, occ-name) pair and provides something of a lookup mechanism for those names. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NameCache" class="def">NameCache</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:nsUniqs" class="def">nsUniqs</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></dt><dd class="doc"><p>Supply of uniques </p></dd><dt class="src"><a name="v:nsNames" class="def">nsNames</a> :: <a href="HscTypes.html#t:OrigNameCache">OrigNameCache</a></dt><dd class="doc"><p>Ensures that one original name gets one unique </p></dd><dt class="src"><a name="v:nsIPs" class="def">nsIPs</a> :: <a href="HscTypes.html#t:OrigIParamCache">OrigIParamCache</a></dt><dd class="doc"><p>Ensures that one implicit parameter name gets one unique </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:OrigNameCache" class="def">OrigNameCache</a> = <a href="Module.html#t:ModuleEnv">ModuleEnv</a> (<a href="OccName.html#t:OccEnv">OccEnv</a> <a href="Name.html#t:Name">Name</a>)</p><div class="doc"><p>Per-module cache of original <code><a href="OccName.html#t:OccName">OccName</a></code>s given <code><a href="Name.html#t:Name">Name</a></code>s </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:OrigIParamCache" class="def">OrigIParamCache</a> = <a href="../containers-0.4.2.1/Data-Map.html#t:Map">Map</a> <a href="FastString.html#t:FastString">FastString</a> (<a href="BasicTypes.html#t:IPName">IPName</a> <a href="Name.html#t:Name">Name</a>)</p><div class="doc"><p>Module-local cache of implicit parameter <code><a href="OccName.html#t:OccName">OccName</a></code>s given <code><a href="Name.html#t:Name">Name</a></code>s </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IfaceExport" class="def">IfaceExport</a> = <a href="Avail.html#t:AvailInfo">AvailInfo</a></p><div class="doc"><p>The original names declared of a certain module that are exported </p></div></div><h1 id="g:13">Warnings </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Warnings" class="def">Warnings</a> </p><div class="doc"><p>Warning information for a module </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NoWarnings" class="def">NoWarnings</a></td><td class="doc"><p>Nothing deprecated </p></td></tr><tr><td class="src"><a name="v:WarnAll" class="def">WarnAll</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></td><td class="doc"><p>Whole module deprecated </p></td></tr><tr><td class="src"><a name="v:WarnSome" class="def">WarnSome</a> [(<a href="OccName.html#t:OccName">OccName</a>, <a href="HscTypes.html#t:WarningTxt">WarningTxt</a>)]</td><td class="doc"><p>Some specific things deprecated </p></td></tr></table></div><div class="subs instances"><p id="control.i:Warnings" class="caption collapser" onclick="toggleSection('i:Warnings')">Instances</p><div id="section.i:Warnings" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="HscTypes.html#t:Warnings">Warnings</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:Warnings">Warnings</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="HscTypes.html#t:Warnings">Warnings</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:WarningTxt" class="def">WarningTxt</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:WarningTxt" class="def">WarningTxt</a> [<a href="FastString.html#t:FastString">FastString</a>]</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:DeprecatedTxt" class="def">DeprecatedTxt</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:WarningTxt" class="caption collapser" onclick="toggleSection('i:WarningTxt')">Instances</p><div id="section.i:WarningTxt" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</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="HscTypes.html#t:WarningTxt">WarningTxt</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="HscTypes.html#t:WarningTxt">WarningTxt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="HscTypes.html#t:WarningTxt">WarningTxt</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:plusWarns" class="def">plusWarns</a> :: <a href="HscTypes.html#t:Warnings">Warnings</a> -> <a href="HscTypes.html#t:Warnings">Warnings</a> -> <a href="HscTypes.html#t:Warnings">Warnings</a></p></div><h1 id="g:14">Linker stuff </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Linkable" class="def">Linkable</a> </p><div class="doc"><p>Information we can use to dynamically link modules into the compiler </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LM" class="def">LM</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:linkableTime" class="def">linkableTime</a> :: <a href="../old-time-1.1.0.0/System-Time.html#t:ClockTime">ClockTime</a></dt><dd class="doc"><p>Time at which this linkable was built (i.e. when the bytecodes were produced, or the mod date on the files) </p></dd><dt class="src"><a name="v:linkableModule" class="def">linkableModule</a> :: <a href="Module.html#t:Module">Module</a></dt><dd class="doc"><p>The linkable module itself </p></dd><dt class="src"><a name="v:linkableUnlinked" class="def">linkableUnlinked</a> :: [<a href="HscTypes.html#t:Unlinked">Unlinked</a>]</dt><dd class="doc"><p>Those files and chunks of code we have yet to link. </p><p>INVARIANT: A valid linkable always has at least one <code><a href="HscTypes.html#t:Unlinked">Unlinked</a></code> item. If this list is empty, the Linkable represents a fake linkable, which is generated in HscNothing mode to avoid recompiling modules. </p><p>ToDo: Do items get removed from this list when they get linked? </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Linkable" class="caption collapser" onclick="toggleSection('i:Linkable')">Instances</p><div id="section.i:Linkable" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:Linkable">Linkable</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:isObjectLinkable" class="def">isObjectLinkable</a> :: <a href="HscTypes.html#t:Linkable">Linkable</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:linkableObjs" class="def">linkableObjs</a> :: <a href="HscTypes.html#t:Linkable">Linkable</a> -> [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Unlinked" class="def">Unlinked</a> </p><div class="doc"><p>Objects which have yet to be linked by the compiler </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:DotO" class="def">DotO</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>An object file (.o) </p></td></tr><tr><td class="src"><a name="v:DotA" class="def">DotA</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Static archive file (.a) </p></td></tr><tr><td class="src"><a name="v:DotDLL" class="def">DotDLL</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Dynamically linked library file (.so, .dll, .dylib) </p></td></tr><tr><td class="src"><a name="v:BCOs" class="def">BCOs</a> <a href="HscTypes.html#t:CompiledByteCode">CompiledByteCode</a> <a href="HscTypes.html#t:ModBreaks">ModBreaks</a></td><td class="doc"><p>A byte-code object, lives only in memory </p></td></tr></table></div><div class="subs instances"><p id="control.i:Unlinked" class="caption collapser" onclick="toggleSection('i:Unlinked')">Instances</p><div id="section.i:Unlinked" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:Unlinked">Unlinked</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:CompiledByteCode" class="def">CompiledByteCode</a> </p><div class="subs instances"><p id="control.i:CompiledByteCode" class="caption collapser" onclick="toggleSection('i:CompiledByteCode')">Instances</p><div id="section.i:CompiledByteCode" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:CompiledByteCode">CompiledByteCode</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:isObject" class="def">isObject</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this an actual file on disk we can link in somehow? </p></div></div><div class="top"><p class="src"><a name="v:nameOfObject" class="def">nameOfObject</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a></p><div class="doc"><p>Retrieve the filename of the linkable if possible. Panic if it is a byte-code object </p></div></div><div class="top"><p class="src"><a name="v:isInterpretable" class="def">isInterpretable</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this a bytecode linkable with no file on disk? </p></div></div><div class="top"><p class="src"><a name="v:byteCodeOfObject" class="def">byteCodeOfObject</a> :: <a href="HscTypes.html#t:Unlinked">Unlinked</a> -> <a href="HscTypes.html#t:CompiledByteCode">CompiledByteCode</a></p><div class="doc"><p>Retrieve the compiled byte-code if possible. Panic if it is a file-based linkable </p></div></div><h1 id="g:15">Program coverage </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HpcInfo" class="def">HpcInfo</a> </p><div class="doc"><p>Information about a modules use of Haskell Program Coverage </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HpcInfo" class="def">HpcInfo</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:hpcInfoTickCount" class="def">hpcInfoTickCount</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:hpcInfoHash" class="def">hpcInfoHash</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:NoHpcInfo" class="def">NoHpcInfo</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:hpcUsed" class="def">hpcUsed</a> :: <a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a></dt><dd class="doc"><p>Is hpc used anywhere on the module *tree*? </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:emptyHpcInfo" class="def">emptyHpcInfo</a> :: <a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a> -> <a href="HscTypes.html#t:HpcInfo">HpcInfo</a></p></div><div class="top"><p class="src"><a name="v:isHpcUsed" class="def">isHpcUsed</a> :: <a href="HscTypes.html#t:HpcInfo">HpcInfo</a> -> <a href="HscTypes.html#t:AnyHpcUsage">AnyHpcUsage</a></p><div class="doc"><p>Find out if HPC is used by this module or any of the modules it depends upon </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:AnyHpcUsage" class="def">AnyHpcUsage</a> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>This is used to signal if one of my imports used HPC instrumentation even if there is no module-local HPC usage </p></div></div><h1 id="g:16">Breakpoints </h1><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="BreakArray.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="HscTypes.html#t:BreakIndex">BreakIndex</a> <a href="SrcLoc.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="HscTypes.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="HscTypes.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"><a name="v:emptyModBreaks" class="def">emptyModBreaks</a> :: <a href="HscTypes.html#t:ModBreaks">ModBreaks</a></p><div class="doc"><p>Construct an empty ModBreaks </p></div></div><h1 id="g:17">Vectorisation information </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:VectInfo" class="def">VectInfo</a> </p><div class="doc"><p>Vectorisation information for <code><a href="HscTypes.html#t:ModGuts">ModGuts</a></code>, <code><a href="HscTypes.html#t:ModDetails">ModDetails</a></code> and <code><a href="HscTypes.html#t:ExternalPackageState">ExternalPackageState</a></code>; see also documentation at <code><a href="Vectorise-Env.html#t:GlobalEnv">GlobalEnv</a></code>. </p><p>NB: The following tables may also include <code><a href="Var.html#t:Var">Var</a></code>s, <code><a href="TyCon.html#t:TyCon">TyCon</a></code>s and <code><a href="DataCon.html#t:DataCon">DataCon</a></code>s from imported modules, which have been subsequently vectorised in the current module. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:VectInfo" class="def">VectInfo</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:vectInfoVar" class="def">vectInfoVar</a> :: <a href="VarEnv.html#t:VarEnv">VarEnv</a> (<a href="Var.html#t:Var">Var</a>, <a href="Var.html#t:Var">Var</a>)</dt><dd class="doc"><p><code>(f, f_v)</code> keyed on <code>f</code> </p></dd><dt class="src"><a name="v:vectInfoTyCon" class="def">vectInfoTyCon</a> :: <a href="NameEnv.html#t:NameEnv">NameEnv</a> (<a href="TyCon.html#t:TyCon">TyCon</a>, <a href="TyCon.html#t:TyCon">TyCon</a>)</dt><dd class="doc"><p><code>(T, T_v)</code> keyed on <code>T</code> </p></dd><dt class="src"><a name="v:vectInfoDataCon" class="def">vectInfoDataCon</a> :: <a href="NameEnv.html#t:NameEnv">NameEnv</a> (<a href="DataCon.html#t:DataCon">DataCon</a>, <a href="DataCon.html#t:DataCon">DataCon</a>)</dt><dd class="doc"><p><code>(C, C_v)</code> keyed on <code>C</code> </p></dd><dt class="src"><a name="v:vectInfoScalarVars" class="def">vectInfoScalarVars</a> :: <a href="VarSet.html#t:VarSet">VarSet</a></dt><dd class="doc"><p>set of purely scalar variables </p></dd><dt class="src"><a name="v:vectInfoScalarTyCons" class="def">vectInfoScalarTyCons</a> :: <a href="NameSet.html#t:NameSet">NameSet</a></dt><dd class="doc"><p>set of scalar type constructors </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:VectInfo" class="caption collapser" onclick="toggleSection('i:VectInfo')">Instances</p><div id="section.i:VectInfo" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:VectInfo">VectInfo</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:IfaceVectInfo" class="def">IfaceVectInfo</a> </p><div class="doc"><p>Vectorisation information for <code><a href="HscTypes.html#t:ModIface">ModIface</a></code>; i.e, the vectorisation information propagated across module boundaries. </p><p>NB: The field <code><a href="HscTypes.html#v:ifaceVectInfoVar">ifaceVectInfoVar</a></code> explicitly contains the workers of data constructors as well as class selectors — i.e., their mappings are <em>not</em> implicitly generated from the data types. Moreover, whether the worker of a data constructor is in <code><a href="HscTypes.html#v:ifaceVectInfoVar">ifaceVectInfoVar</a></code> determines whether that data constructor was vectorised (or is part of an abstractly vectorised type constructor). </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IfaceVectInfo" class="def">IfaceVectInfo</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:ifaceVectInfoVar" class="def">ifaceVectInfoVar</a> :: [<a href="Name.html#t:Name">Name</a>]</dt><dd class="doc"><p>All variables in here have a vectorised variant </p></dd><dt class="src"><a name="v:ifaceVectInfoTyCon" class="def">ifaceVectInfoTyCon</a> :: [<a href="Name.html#t:Name">Name</a>]</dt><dd class="doc"><p>All <code><a href="TyCon.html#t:TyCon">TyCon</a></code>s in here have a vectorised variant; the name of the vectorised variant and those of its data constructors are determined by <code><a href="OccName.html#v:mkVectTyConOcc">mkVectTyConOcc</a></code> and <code><a href="OccName.html#v:mkVectDataConOcc">mkVectDataConOcc</a></code>; the names of the isomorphisms are determined by <code><a href="OccName.html#v:mkVectIsoOcc">mkVectIsoOcc</a></code> </p></dd><dt class="src"><a name="v:ifaceVectInfoTyConReuse" class="def">ifaceVectInfoTyConReuse</a> :: [<a href="Name.html#t:Name">Name</a>]</dt><dd class="doc"><p>The vectorised form of all the <code><a href="TyCon.html#t:TyCon">TyCon</a></code>s in here coincides with the unconverted form; the name of the isomorphisms is determined by <code><a href="OccName.html#v:mkVectIsoOcc">mkVectIsoOcc</a></code> </p></dd><dt class="src"><a name="v:ifaceVectInfoScalarVars" class="def">ifaceVectInfoScalarVars</a> :: [<a href="Name.html#t:Name">Name</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:ifaceVectInfoScalarTyCons" class="def">ifaceVectInfoScalarTyCons</a> :: [<a href="Name.html#t:Name">Name</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:IfaceVectInfo" class="caption collapser" onclick="toggleSection('i:IfaceVectInfo')">Instances</p><div id="section.i:IfaceVectInfo" class="show"><table><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:noVectInfo" class="def">noVectInfo</a> :: <a href="HscTypes.html#t:VectInfo">VectInfo</a></p></div><div class="top"><p class="src"><a name="v:plusVectInfo" class="def">plusVectInfo</a> :: <a href="HscTypes.html#t:VectInfo">VectInfo</a> -> <a href="HscTypes.html#t:VectInfo">VectInfo</a> -> <a href="HscTypes.html#t:VectInfo">VectInfo</a></p></div><div class="top"><p class="src"><a name="v:noIfaceVectInfo" class="def">noIfaceVectInfo</a> :: <a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</a></p></div><div class="top"><p class="src"><a name="v:isNoIfaceVectInfo" class="def">isNoIfaceVectInfo</a> :: <a href="HscTypes.html#t:IfaceVectInfo">IfaceVectInfo</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p></div><h1 id="g:18">Safe Haskell information </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:IfaceTrustInfo" class="def">IfaceTrustInfo</a> </p><div class="doc"><p>Safe Haskell information for <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> Simply a wrapper around SafeHaskellMode to sepperate iface and flags </p></div><div class="subs instances"><p id="control.i:IfaceTrustInfo" class="caption collapser" onclick="toggleSection('i:IfaceTrustInfo')">Instances</p><div id="section.i:IfaceTrustInfo" class="show"><table><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Binary.html#t:Binary">Binary</a> <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getSafeMode" class="def">getSafeMode</a> :: <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a> -> <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a></p></div><div class="top"><p class="src"><a name="v:setSafeMode" class="def">setSafeMode</a> :: <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a> -> <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></p></div><div class="top"><p class="src"><a name="v:noIfaceTrustInfo" class="def">noIfaceTrustInfo</a> :: <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></p></div><div class="top"><p class="src"><a name="v:trustInfoToNum" class="def">trustInfoToNum</a> :: <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a> -> <a href="../base-4.5.1.0/Data-Word.html#t:Word8">Word8</a></p></div><div class="top"><p class="src"><a name="v:numToTrustInfo" class="def">numToTrustInfo</a> :: <a href="../base-4.5.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="HscTypes.html#t:IfaceTrustInfo">IfaceTrustInfo</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IsSafeImport" class="def">IsSafeImport</a> = <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is an import a safe import? </p></div></div><h1 id="g:19">result of the parser </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HsParsedModule" class="def">HsParsedModule</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HsParsedModule" class="def">HsParsedModule</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:hpm_module" class="def">hpm_module</a> :: <a href="SrcLoc.html#t:Located">Located</a> (<a href="HsSyn.html#t:HsModule">HsModule</a> <a href="RdrName.html#t:RdrName">RdrName</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:hpm_src_files" class="def">hpm_src_files</a> :: [<a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>]</dt><dd class="doc"><p>extra source files (e.g. from #includes). The lexer collects these from '# <a href="file">file</a> <a href="line">line</a>' pragmas, which the C preprocessor leaves behind. These files and their timestamps are stored in the .hi file, so that we can force recompilation if any of them change (#3589) </p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><h1 id="g:20">Compilation errors and warnings </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:SourceError" class="def">SourceError</a> </p><div class="doc"><p>A source error is an error that is caused by one or more errors in the source code. A <code><a href="HscTypes.html#t:SourceError">SourceError</a></code> is thrown by many functions in the compilation pipeline. Inside GHC these errors are merely printed via <code><a href="DynFlags.html#v:log_action">log_action</a></code>, but API clients may treat them differently, for example, insert them into a list box. If you want the default behaviour, use the idiom: </p><pre> handleSourceError printExceptionAndWarnings $ do ... api calls that may fail ... </pre><p>The <code><a href="HscTypes.html#t:SourceError">SourceError</a></code>s error messages can be accessed via <code><a href="HscTypes.html#v:srcErrorMessages">srcErrorMessages</a></code>. This list may be empty if the compiler failed due to <code>-Werror</code> (<code><a href="DynFlags.html#v:Opt_WarnIsError">Opt_WarnIsError</a></code>). </p><p>See <code>printExceptionAndWarnings</code> for more information on what to take care of when writing a custom error handler. </p></div><div class="subs instances"><p id="control.i:SourceError" class="caption collapser" onclick="toggleSection('i:SourceError')">Instances</p><div id="section.i:SourceError" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="HscTypes.html#t:SourceError">SourceError</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="HscTypes.html#t:SourceError">SourceError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Panic.html#t:Exception">Exception</a> <a href="HscTypes.html#t:SourceError">SourceError</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:GhcApiError" class="def">GhcApiError</a> </p><div class="doc"><p>An error thrown if the GHC API is used in an incorrect fashion. </p></div><div class="subs instances"><p id="control.i:GhcApiError" class="caption collapser" onclick="toggleSection('i:GhcApiError')">Instances</p><div id="section.i:GhcApiError" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="HscTypes.html#t:GhcApiError">GhcApiError</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="HscTypes.html#t:GhcApiError">GhcApiError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Panic.html#t:Exception">Exception</a> <a href="HscTypes.html#t:GhcApiError">GhcApiError</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkSrcErr" class="def">mkSrcErr</a> :: <a href="ErrUtils.html#t:ErrorMessages">ErrorMessages</a> -> <a href="HscTypes.html#t:SourceError">SourceError</a></p></div><div class="top"><p class="src"><a name="v:srcErrorMessages" class="def">srcErrorMessages</a> :: <a href="HscTypes.html#t:SourceError">SourceError</a> -> <a href="ErrUtils.html#t:ErrorMessages">ErrorMessages</a></p></div><div class="top"><p class="src"><a name="v:mkApiErr" class="def">mkApiErr</a> :: <a href="Outputable.html#t:SDoc">SDoc</a> -> <a href="HscTypes.html#t:GhcApiError">GhcApiError</a></p></div><div class="top"><p class="src"><a name="v:throwOneError" class="def">throwOneError</a> :: <a href="MonadUtils.html#t:MonadIO">MonadIO</a> m => <a href="ErrUtils.html#t:ErrMsg">ErrMsg</a> -> m ab</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:handleFlagWarnings" class="def">handleFlagWarnings</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> [<a href="SrcLoc.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> ()</p></div><div class="top"><p class="src"><a name="v:printOrThrowWarnings" class="def">printOrThrowWarnings</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -> <a href="Bag.html#t:Bag">Bag</a> <a href="ErrUtils.html#t:WarnMsg">WarnMsg</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Given a bag of warnings, turn them into an exception if -Werror is enabled, or print them out otherwise. </p></div></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>