Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 2906

ghc-7.4.2-4.mga5.i586.rpm

<!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>HscMain</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_HscMain.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">HscMain</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Making an HscEnv
</a></li><li><a href="#g:2">Compiling complete source files
</a></li><li><a href="#g:3">Running passes separately
</a><ul><li><a href="#g:4">Backends
</a></li></ul></li><li><a href="#g:5">Support for interactive evaluation
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Main API for compiling plain Haskell source code.
</p><p>This module implements compilation of a Haskell source. It is
 <em>not</em> concerned with preprocessing of source files; this is handled
 in <a href="DriverPipeline.html">DriverPipeline</a>.
</p><p>There are various entry points depending on what mode we're in:
 <a href="batch.html">batch</a> mode (<code>--make</code>), <a href="one-shot.html">one-shot</a> mode (<code>-c</code>, <code>-S</code> etc.), and
 <a href="interactive.html">interactive</a> mode (GHCi). There are also entry points for
 individual passes: parsing, typechecking/renaming, desugaring, and
 simplification.
</p><p>All the functions here take an <code><a href="HscTypes.html#t:HscEnv">HscEnv</a></code> as a parameter, but none of
 them return a new one: <code><a href="HscTypes.html#t:HscEnv">HscEnv</a></code> is treated as an immutable value
 from here on in (although it has mutable components, for the
 caches).
</p><p>Warning messages are dealt with consistently throughout this API:
 during compilation warnings are collected, and before any function
 in <code>HscMain</code> returns, the warnings are either printed, or turned
 into a real compialtion error if the <code>-Werror</code> flag is enabled.
</p><p>(c) The GRASP/AQUA Project, Glasgow University, 1993-2000
</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"><a href="#v:newHscEnv">newHscEnv</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:HscEnv">HscEnv</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Compiler">Compiler</a> result = <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="HscTypes.html#t:SourceModified">SourceModified</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModIface">ModIface</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>) -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> result</li><li class="src short"><span class="keyword">data</span>  <a href="#t:HscStatus-39-">HscStatus'</a> a<ul class="subs"><li>= <a href="#v:HscNoRecomp">HscNoRecomp</a>  </li><li>| <a href="#v:HscRecomp">HscRecomp</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>) a  </li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:InteractiveStatus">InteractiveStatus</a> = <a href="HscMain.html#t:HscStatus-39-">HscStatus'</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="ByteCodeAsm.html#t:CompiledByteCode">CompiledByteCode</a>, <a href="HscTypes.html#t:ModBreaks">ModBreaks</a>))</li><li class="src short"><span class="keyword">type</span> <a href="#t:HscStatus">HscStatus</a> = <a href="HscMain.html#t:HscStatus-39-">HscStatus'</a> ()</li><li class="src short"><a href="#v:hscCompileOneShot">hscCompileOneShot</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> OneShotResult</li><li class="src short"><a href="#v:hscCompileBatch">hscCompileBatch</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> (<a href="HscMain.html#t:HscStatus">HscStatus</a>, <a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</li><li class="src short"><a href="#v:hscCompileNothing">hscCompileNothing</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> (<a href="HscMain.html#t:HscStatus">HscStatus</a>, <a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</li><li class="src short"><a href="#v:hscCompileInteractive">hscCompileInteractive</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> (<a href="HscMain.html#t:InteractiveStatus">InteractiveStatus</a>, <a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</li><li class="src short"><a href="#v:hscCompileCmmFile">hscCompileCmmFile</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:hscCompileCore">hscCompileCore</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="CoreSyn.html#t:CoreProgram">CoreProgram</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:hscParse">hscParse</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:HsParsedModule">HsParsedModule</a></li><li class="src short"><a href="#v:hscTypecheckRename">hscTypecheckRename</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="HscTypes.html#t:HsParsedModule">HsParsedModule</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a>, RenamedStuff)</li><li class="src short"><a href="#v:hscDesugar">hscDesugar</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModGuts">ModGuts</a></li><li class="src short"><a href="#v:makeSimpleIface">makeSimpleIface</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModIface">ModIface</a> -&gt; <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscTypes.html#t:ModDetails">ModDetails</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:makeSimpleDetails">makeSimpleDetails</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModDetails">ModDetails</a></li><li class="src short"><a href="#v:hscSimplify">hscSimplify</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModGuts">ModGuts</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModGuts">ModGuts</a></li><li class="src short"><a href="#v:hscOneShotBackendOnly">hscOneShotBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> OneShotResult</li><li class="src short"><a href="#v:hscBatchBackendOnly">hscBatchBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> BatchResult</li><li class="src short"><a href="#v:hscNothingBackendOnly">hscNothingBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> NothingResult</li><li class="src short"><a href="#v:hscInteractiveBackendOnly">hscInteractiveBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> InteractiveResult</li><li class="src short"><a href="#v:hscParseIdentifier">hscParseIdentifier</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="SrcLoc.html#t:Located">Located</a> <a href="RdrName.html#t:RdrName">RdrName</a>)</li><li class="src short"><a href="#v:hscTcRcLookupName">hscTcRcLookupName</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Name.html#t:Name">Name</a> -&gt; <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="Type.html#t:TyThing">TyThing</a>)</li><li class="src short"><a href="#v:hscTcRnGetInfo">hscTcRnGetInfo</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Name.html#t:Name">Name</a> -&gt; <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="Type.html#t:TyThing">TyThing</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>, [<a href="InstEnv.html#t:Instance">Instance</a>]))</li><li class="src short"><a href="#v:hscCheckSafe">hscCheckSafe</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Module.html#t:Module">Module</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <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="Module.html#t:PackageId">PackageId</a>)</li><li class="src short"><a href="#v:hscGetModuleInterface">hscGetModuleInterface</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Module.html#t:Module">Module</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModIface">ModIface</a></li><li class="src short"><a href="#v:hscRnImportDecls">hscRnImportDecls</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; [<a href="HsImpExp.html#t:LImportDecl">LImportDecl</a> <a href="RdrName.html#t:RdrName">RdrName</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></li><li class="src short"><a href="#v:hscTcRnLookupRdrName">hscTcRnLookupRdrName</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="RdrName.html#t:RdrName">RdrName</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> [<a href="Name.html#t:Name">Name</a>]</li><li class="src short"><a href="#v:hscStmt">hscStmt</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <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="Var.html#t:Id">Id</a>], <a href="ByteCodeLink.html#t:HValue">HValue</a>))</li><li class="src short"><a href="#v:hscStmtWithLocation">hscStmtWithLocation</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <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="Var.html#t:Id">Id</a>], <a href="ByteCodeLink.html#t:HValue">HValue</a>))</li><li class="src short"><a href="#v:hscDecls">hscDecls</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ([<a href="Type.html#t:TyThing">TyThing</a>], <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a>)</li><li class="src short"><a href="#v:hscDeclsWithLocation">hscDeclsWithLocation</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ([<a href="Type.html#t:TyThing">TyThing</a>], <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a>)</li><li class="src short"><a href="#v:hscTcExpr">hscTcExpr</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Type.html#t:Type">Type</a></li><li class="src short"><a href="#v:hscImport">hscImport</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</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:hscKcType">hscKcType</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="Type.html#t:Type">Type</a>, <a href="Kind.html#t:Kind">Kind</a>)</li><li class="src short"><a href="#v:hscCompileCoreExpr">hscCompileCoreExpr</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="CoreSyn.html#t:CoreExpr">CoreExpr</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="ByteCodeLink.html#t:HValue">HValue</a></li></ul></div><div id="interface"><h1 id="g:1">Making an HscEnv
</h1><div class="top"><p class="src"><a name="v:newHscEnv" class="def">newHscEnv</a> :: <a href="DynFlags.html#t:DynFlags">DynFlags</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:HscEnv">HscEnv</a></p></div><h1 id="g:2">Compiling complete source files
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Compiler" class="def">Compiler</a> result = <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="HscTypes.html#t:SourceModified">SourceModified</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModIface">ModIface</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>) -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> result</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:HscStatus-39-" class="def">HscStatus'</a> a </p><div class="doc"><p>Status of a compilation to hard-code or nothing.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HscNoRecomp" class="def">HscNoRecomp</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:HscRecomp" class="def">HscRecomp</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a>) a</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:InteractiveStatus" class="def">InteractiveStatus</a> = <a href="HscMain.html#t:HscStatus-39-">HscStatus'</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="ByteCodeAsm.html#t:CompiledByteCode">CompiledByteCode</a>, <a href="HscTypes.html#t:ModBreaks">ModBreaks</a>))</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:HscStatus" class="def">HscStatus</a> = <a href="HscMain.html#t:HscStatus-39-">HscStatus'</a> ()</p></div><div class="top"><p class="src"><a name="v:hscCompileOneShot" class="def">hscCompileOneShot</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> OneShotResult</p></div><div class="top"><p class="src"><a name="v:hscCompileBatch" class="def">hscCompileBatch</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> (<a href="HscMain.html#t:HscStatus">HscStatus</a>, <a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</p><div class="doc"><p>Compile Haskell, boot and extCore in batch mode.
</p></div></div><div class="top"><p class="src"><a name="v:hscCompileNothing" class="def">hscCompileNothing</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> (<a href="HscMain.html#t:HscStatus">HscStatus</a>, <a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</p></div><div class="top"><p class="src"><a name="v:hscCompileInteractive" class="def">hscCompileInteractive</a> :: <a href="HscMain.html#t:Compiler">Compiler</a> (<a href="HscMain.html#t:InteractiveStatus">InteractiveStatus</a>, <a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="HscTypes.html#t:ModDetails">ModDetails</a>)</p></div><div class="top"><p class="src"><a name="v:hscCompileCmmFile" class="def">hscCompileCmmFile</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <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:hscCompileCore" class="def">hscCompileCore</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="DynFlags.html#t:SafeHaskellMode">SafeHaskellMode</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="CoreSyn.html#t:CoreProgram">CoreProgram</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><h1 id="g:3">Running passes separately
</h1><div class="top"><p class="src"><a name="v:hscParse" class="def">hscParse</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:HsParsedModule">HsParsedModule</a></p><div class="doc"><p>parse a file, returning the abstract syntax
</p></div></div><div class="top"><p class="src"><a name="v:hscTypecheckRename" class="def">hscTypecheckRename</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="HscTypes.html#t:HsParsedModule">HsParsedModule</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a>, RenamedStuff)</p><div class="doc"><p>Rename and typecheck a module, additionally returning the renamed syntax
</p></div></div><div class="top"><p class="src"><a name="v:hscDesugar" class="def">hscDesugar</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModSummary">ModSummary</a> -&gt; <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModGuts">ModGuts</a></p><div class="doc"><p>Convert a typechecked module to Core
</p></div></div><div class="top"><p class="src"><a name="v:makeSimpleIface" class="def">makeSimpleIface</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HscTypes.html#t:ModIface">ModIface</a> -&gt; <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscTypes.html#t:ModDetails">ModDetails</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="HscTypes.html#t:ModIface">ModIface</a>, <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a>)</p><div class="doc"><p>Make a <code><a href="HscTypes.html#t:ModIface">ModIface</a></code> from the results of typechecking. Used when
 not optimising, and the interface doesn't need to contain any
 unfoldings or other cross-module optimisation info.
 ToDo: the old interface is only needed to get the version numbers,
 we should use fingerprint versions instead.
</p></div></div><div class="top"><p class="src"><a name="v:makeSimpleDetails" class="def">makeSimpleDetails</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModDetails">ModDetails</a></p><div class="doc"><p>Make a <code><a href="HscTypes.html#t:ModDetails">ModDetails</a></code> from the results of typechecking. Used when
 typechecking only, as opposed to full compilation.
</p></div></div><div class="top"><p class="src"><a name="v:hscSimplify" class="def">hscSimplify</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="HscTypes.html#t:ModGuts">ModGuts</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModGuts">ModGuts</a></p></div><h2 id="g:4">Backends
</h2><div class="top"><p class="src"><a name="v:hscOneShotBackendOnly" class="def">hscOneShotBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> OneShotResult</p></div><div class="top"><p class="src"><a name="v:hscBatchBackendOnly" class="def">hscBatchBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> BatchResult</p></div><div class="top"><p class="src"><a name="v:hscNothingBackendOnly" class="def">hscNothingBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> NothingResult</p></div><div class="top"><p class="src"><a name="v:hscInteractiveBackendOnly" class="def">hscInteractiveBackendOnly</a> :: <a href="TcRnTypes.html#t:TcGblEnv">TcGblEnv</a> -&gt; <a href="HscMain.html#t:Compiler">Compiler</a> InteractiveResult</p></div><h1 id="g:5">Support for interactive evaluation
</h1><div class="top"><p class="src"><a name="v:hscParseIdentifier" class="def">hscParseIdentifier</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="SrcLoc.html#t:Located">Located</a> <a href="RdrName.html#t:RdrName">RdrName</a>)</p></div><div class="top"><p class="src"><a name="v:hscTcRcLookupName" class="def">hscTcRcLookupName</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Name.html#t:Name">Name</a> -&gt; <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="Type.html#t:TyThing">TyThing</a>)</p></div><div class="top"><p class="src"><a name="v:hscTcRnGetInfo" class="def">hscTcRnGetInfo</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Name.html#t:Name">Name</a> -&gt; <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="Type.html#t:TyThing">TyThing</a>, <a href="BasicTypes.html#t:Fixity">Fixity</a>, [<a href="InstEnv.html#t:Instance">Instance</a>]))</p></div><div class="top"><p class="src"><a name="v:hscCheckSafe" class="def">hscCheckSafe</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Module.html#t:Module">Module</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <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="Module.html#t:PackageId">PackageId</a>)</p><div class="doc"><p>Check that a module is safe to import.
</p><p>We return a package id if the safe import is OK and a Nothing otherwise
 with the reason for the failure printed out.
</p></div></div><div class="top"><p class="src"><a name="v:hscGetModuleInterface" class="def">hscGetModuleInterface</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="Module.html#t:Module">Module</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="HscTypes.html#t:ModIface">ModIface</a></p></div><div class="top"><p class="src"><a name="v:hscRnImportDecls" class="def">hscRnImportDecls</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; [<a href="HsImpExp.html#t:LImportDecl">LImportDecl</a> <a href="RdrName.html#t:RdrName">RdrName</a>] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="RdrName.html#t:GlobalRdrEnv">GlobalRdrEnv</a></p><div class="doc"><p>Rename some import declarations
</p></div></div><div class="top"><p class="src"><a name="v:hscTcRnLookupRdrName" class="def">hscTcRnLookupRdrName</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="RdrName.html#t:RdrName">RdrName</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> [<a href="Name.html#t:Name">Name</a>]</p><div class="doc"><p>Lookup things in the compiler's environment
</p></div></div><div class="top"><p class="src"><a name="v:hscStmt" class="def">hscStmt</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HscTypes.html#t:HscEnv">HscEnv</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The statement
</p></td></tr><tr><td class="src">-&gt; <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="Var.html#t:Id">Id</a>], <a href="ByteCodeLink.html#t:HValue">HValue</a>))</td><td class="doc"><p><code><a href="../base-4.5.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> <a href="==">==</a> empty statement
 (or comment only), but no parse error
</p></td></tr></table></div><div class="doc"><p>Compile a stmt all the way to an HValue, but don't run it
</p></div></div><div class="top"><p class="src"><a name="v:hscStmtWithLocation" class="def">hscStmtWithLocation</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HscTypes.html#t:HscEnv">HscEnv</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The statement
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The source
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Starting line
</p></td></tr><tr><td class="src">-&gt; <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="Var.html#t:Id">Id</a>], <a href="ByteCodeLink.html#t:HValue">HValue</a>))</td><td class="doc"><p><code><a href="../base-4.5.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> <a href="==">==</a> empty statement
 (or comment only), but no parse error
</p></td></tr></table></div><div class="doc"><p>Compile a stmt all the way to an HValue, but don't run it
</p></div></div><div class="top"><p class="src"><a name="v:hscDecls" class="def">hscDecls</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HscTypes.html#t:HscEnv">HscEnv</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The statement
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ([<a href="Type.html#t:TyThing">TyThing</a>], <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a>)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Compile a decls
</p></div></div><div class="top"><p class="src"><a name="v:hscDeclsWithLocation" class="def">hscDeclsWithLocation</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HscTypes.html#t:HscEnv">HscEnv</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The statement
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The source
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Starting line
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ([<a href="Type.html#t:TyThing">TyThing</a>], <a href="HscTypes.html#t:InteractiveContext">InteractiveContext</a>)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Compile a decls
</p></div></div><div class="top"><p class="src"><a name="v:hscTcExpr" class="def">hscTcExpr</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HscTypes.html#t:HscEnv">HscEnv</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The expression
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Type.html#t:Type">Type</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Typecheck an expression (but don't run it)
</p></div></div><div class="top"><p class="src"><a name="v:hscImport" class="def">hscImport</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</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:hscKcType" class="def">hscKcType</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HscTypes.html#t:HscEnv">HscEnv</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Normalise the type
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The type as a string
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="Type.html#t:Type">Type</a>, <a href="Kind.html#t:Kind">Kind</a>)</td><td class="doc"><p>Resulting type (possibly normalised) and kind
</p></td></tr></table></div><div class="doc"><p>Find the kind of a type
</p></div></div><div class="top"><p class="src"><a name="v:hscCompileCoreExpr" class="def">hscCompileCoreExpr</a> :: <a href="HscTypes.html#t:HscEnv">HscEnv</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="CoreSyn.html#t:CoreExpr">CoreExpr</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="ByteCodeLink.html#t:HValue">HValue</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>