Sophie

Sophie

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

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>SrcLoc</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_SrcLoc.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">SrcLoc</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">SrcLoc
</a><ul><li><a href="#g:2">Constructing SrcLoc
</a></li><li><a href="#g:3">Unsafely deconstructing SrcLoc
</a></li></ul></li><li><a href="#g:4">SrcSpan
</a><ul><li><a href="#g:5">Constructing SrcSpan
</a></li><li><a href="#g:6">Deconstructing SrcSpan
</a></li><li><a href="#g:7">Unsafely deconstructing SrcSpan
</a></li><li><a href="#g:8">Predicates on SrcSpan
</a></li></ul></li><li><a href="#g:9">Located
</a><ul><li><a href="#g:10">Constructing Located
</a></li><li><a href="#g:11">Deconstructing Located
</a></li><li><a href="#g:12">Combining and comparing Located values
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module contains types that relate to the positions of things
 in source files, and allow tagging of those things with locations
</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:RealSrcLoc">RealSrcLoc</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:SrcLoc">SrcLoc</a> <ul class="subs"><li>= <a href="#v:RealSrcLoc">RealSrcLoc</a> !<a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a>  </li><li>| <a href="#v:UnhelpfulLoc">UnhelpfulLoc</a> <a href="FastString.html#t:FastString">FastString</a>  </li></ul></li><li class="src short"><a href="#v:mkSrcLoc">mkSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:mkRealSrcLoc">mkRealSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></li><li class="src short"><a href="#v:mkGeneralSrcLoc">mkGeneralSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:noSrcLoc">noSrcLoc</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:generatedSrcLoc">generatedSrcLoc</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:interactiveSrcLoc">interactiveSrcLoc</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:advanceSrcLoc">advanceSrcLoc</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="../base-4.5.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></li><li class="src short"><a href="#v:srcLocFile">srcLocFile</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="FastString.html#t:FastString">FastString</a></li><li class="src short"><a href="#v:srcLocLine">srcLocLine</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcLocCol">srcLocCol</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:RealSrcSpan">RealSrcSpan</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:SrcSpan">SrcSpan</a> <ul class="subs"><li>= <a href="#v:RealSrcSpan">RealSrcSpan</a> !<a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a>  </li><li>| <a href="#v:UnhelpfulSpan">UnhelpfulSpan</a> !<a href="FastString.html#t:FastString">FastString</a>  </li></ul></li><li class="src short"><a href="#v:mkGeneralSrcSpan">mkGeneralSrcSpan</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:mkSrcSpan">mkSrcSpan</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:mkRealSrcSpan">mkRealSrcSpan</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></li><li class="src short"><a href="#v:noSrcSpan">noSrcSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:wiredInSrcSpan">wiredInSrcSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:srcLocSpan">srcLocSpan</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:realSrcLocSpan">realSrcLocSpan</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></li><li class="src short"><a href="#v:combineSrcSpans">combineSrcSpans</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:srcSpanStart">srcSpanStart</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:srcSpanEnd">srcSpanEnd</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></li><li class="src short"><a href="#v:realSrcSpanStart">realSrcSpanStart</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></li><li class="src short"><a href="#v:realSrcSpanEnd">realSrcSpanEnd</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></li><li class="src short"><a href="#v:srcSpanFileName_maybe">srcSpanFileName_maybe</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="FastString.html#t:FastString">FastString</a></li><li class="src short"><a href="#v:srcSpanFile">srcSpanFile</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="FastString.html#t:FastString">FastString</a></li><li class="src short"><a href="#v:srcSpanStartLine">srcSpanStartLine</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcSpanEndLine">srcSpanEndLine</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcSpanStartCol">srcSpanStartCol</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:srcSpanEndCol">srcSpanEndCol</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:isGoodSrcSpan">isGoodSrcSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isOneLineSpan">isOneLineSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <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:Located">Located</a> e = <a href="SrcLoc.html#t:GenLocated">GenLocated</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> e</li><li class="src short"><span class="keyword">type</span> <a href="#t:RealLocated">RealLocated</a> e = <a href="SrcLoc.html#t:GenLocated">GenLocated</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> e</li><li class="src short"><span class="keyword">data</span>  <a href="#t:GenLocated">GenLocated</a> l e = <a href="#v:L">L</a> l e</li><li class="src short"><a href="#v:noLoc">noLoc</a> ::  e -&gt; <a href="SrcLoc.html#t:Located">Located</a> e</li><li class="src short"><a href="#v:mkGeneralLocated">mkGeneralLocated</a> ::  <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; e -&gt; <a href="SrcLoc.html#t:Located">Located</a> e</li><li class="src short"><a href="#v:getLoc">getLoc</a> ::  <a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e -&gt; l</li><li class="src short"><a href="#v:unLoc">unLoc</a> ::  <a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e -&gt; e</li><li class="src short"><a href="#v:eqLocated">eqLocated</a> :: <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:cmpLocated">cmpLocated</a> :: <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:combineLocs">combineLocs</a> ::  <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> b -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></li><li class="src short"><a href="#v:addCLoc">addCLoc</a> ::  <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> b -&gt; c -&gt; <a href="SrcLoc.html#t:Located">Located</a> c</li><li class="src short"><a href="#v:leftmost_smallest">leftmost_smallest</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:leftmost_largest">leftmost_largest</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:rightmost">rightmost</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:spans">spans</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; (<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/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSubspanOf">isSubspanOf</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">SrcLoc
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:RealSrcLoc" class="def">RealSrcLoc</a>  </p><div class="doc"><p>Represents a single point within a file
</p></div><div class="subs instances"><p id="control.i:RealSrcLoc" class="caption collapser" onclick="toggleSection('i:RealSrcLoc')">Instances</p><div id="section.i:RealSrcLoc" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SrcLoc" class="def">SrcLoc</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RealSrcLoc" class="def">RealSrcLoc</a> !<a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:UnhelpfulLoc" class="def">UnhelpfulLoc</a> <a href="FastString.html#t:FastString">FastString</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SrcLoc" class="caption collapser" onclick="toggleSection('i:SrcLoc')">Instances</p><div id="section.i:SrcLoc" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:2">Constructing SrcLoc
</h2><div class="top"><p class="src"><a name="v:mkSrcLoc" class="def">mkSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p></div><div class="top"><p class="src"><a name="v:mkRealSrcLoc" class="def">mkRealSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></p></div><div class="top"><p class="src"><a name="v:mkGeneralSrcLoc" class="def">mkGeneralSrcLoc</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Creates a <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code> that has no detailed information about its location
</p></div></div><div class="top"><p class="src"><a name="v:noSrcLoc" class="def">noSrcLoc</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code> values for particular locations
</p></div></div><div class="top"><p class="src"><a name="v:generatedSrcLoc" class="def">generatedSrcLoc</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code> values for particular locations
</p></div></div><div class="top"><p class="src"><a name="v:interactiveSrcLoc" class="def">interactiveSrcLoc</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code> values for particular locations
</p></div></div><div class="top"><p class="src"><a name="v:advanceSrcLoc" class="def">advanceSrcLoc</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="../base-4.5.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></p><div class="doc"><p>Move the <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code> down by one line if the character is a newline,
 to the next 8-char tabstop if it is a tab, and across by one
 character in any other case
</p></div></div><h2 id="g:3">Unsafely deconstructing SrcLoc
</h2><div class="top"><p class="src"><a name="v:srcLocFile" class="def">srcLocFile</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="FastString.html#t:FastString">FastString</a></p><div class="doc"><p>Gives the filename of the <code><a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:srcLocLine" class="def">srcLocLine</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Raises an error when used on a <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:srcLocCol" class="def">srcLocCol</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Raises an error when used on a <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></code>
</p></div></div><h1 id="g:4">SrcSpan
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:RealSrcSpan" class="def">RealSrcSpan</a>  </p><div class="doc"><p>A SrcSpan delimits a portion of a text file.  It could be represented
by a pair of (line,column) coordinates, but in fact we optimise
slightly by using more compact representations for single-line and
zero-length spans, both of which are quite common.
</p><p>The end position is defined to be the column <em>after</em> the end of the
span.  That is, a span of (1,1)-(1,2) is one character long, and a
span of (1,1)-(1,1) is zero characters long.
</p></div><div class="subs instances"><p id="control.i:RealSrcSpan" class="caption collapser" onclick="toggleSection('i:RealSrcSpan')">Instances</p><div id="section.i:RealSrcSpan" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SrcSpan" class="def">SrcSpan</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RealSrcSpan" class="def">RealSrcSpan</a> !<a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:UnhelpfulSpan" class="def">UnhelpfulSpan</a> !<a href="FastString.html#t:FastString">FastString</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SrcSpan" class="caption collapser" onclick="toggleSection('i:SrcSpan')">Instances</p><div id="section.i:SrcSpan" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:5">Constructing SrcSpan
</h2><div class="top"><p class="src"><a name="v:mkGeneralSrcSpan" class="def">mkGeneralSrcSpan</a> :: <a href="FastString.html#t:FastString">FastString</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Create a <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> that has not location information
</p></div></div><div class="top"><p class="src"><a name="v:mkSrcSpan" class="def">mkSrcSpan</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Create a <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> between two points in a file
</p></div></div><div class="top"><p class="src"><a name="v:mkRealSrcSpan" class="def">mkRealSrcSpan</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></p><div class="doc"><p>Create a <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> between two points in a file
</p></div></div><div class="top"><p class="src"><a name="v:noSrcSpan" class="def">noSrcSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code>s for common sources of location uncertainty
</p></div></div><div class="top"><p class="src"><a name="v:wiredInSrcSpan" class="def">wiredInSrcSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Built-in <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code>s for common sources of location uncertainty
</p></div></div><div class="top"><p class="src"><a name="v:srcLocSpan" class="def">srcLocSpan</a> :: <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Create a <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> corresponding to a single point
</p></div></div><div class="top"><p class="src"><a name="v:realSrcLocSpan" class="def">realSrcLocSpan</a> :: <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a> -&gt; <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a></p></div><div class="top"><p class="src"><a name="v:combineSrcSpans" class="def">combineSrcSpans</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p><div class="doc"><p>Combines two <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> into one that spans at least all the characters
 within both spans. Assumes the <a href="file.html">file</a> part is the same in both inputs
</p></div></div><h2 id="g:6">Deconstructing SrcSpan
</h2><div class="top"><p class="src"><a name="v:srcSpanStart" class="def">srcSpanStart</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Returns the location at the start of the <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> or a <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> if that is unavailable
</p></div></div><div class="top"><p class="src"><a name="v:srcSpanEnd" class="def">srcSpanEnd</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcLoc">SrcLoc</a></p><div class="doc"><p>Returns the location at the end of the <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> or a <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> if that is unavailable
</p></div></div><div class="top"><p class="src"><a name="v:realSrcSpanStart" class="def">realSrcSpanStart</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></p></div><div class="top"><p class="src"><a name="v:realSrcSpanEnd" class="def">realSrcSpanEnd</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="SrcLoc.html#t:RealSrcLoc">RealSrcLoc</a></p></div><div class="top"><p class="src"><a name="v:srcSpanFileName_maybe" class="def">srcSpanFileName_maybe</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="FastString.html#t:FastString">FastString</a></p><div class="doc"><p>Obtains the filename for a <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> if it is <a href="good.html">good</a>
</p></div></div><h2 id="g:7">Unsafely deconstructing SrcSpan
</h2><div class="top"><p class="src"><a name="v:srcSpanFile" class="def">srcSpanFile</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="FastString.html#t:FastString">FastString</a></p></div><div class="top"><p class="src"><a name="v:srcSpanStartLine" class="def">srcSpanStartLine</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:srcSpanEndLine" class="def">srcSpanEndLine</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:srcSpanStartCol" class="def">srcSpanStartCol</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:srcSpanEndCol" class="def">srcSpanEndCol</a> :: <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><h2 id="g:8">Predicates on SrcSpan
</h2><div class="top"><p class="src"><a name="v:isGoodSrcSpan" class="def">isGoodSrcSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Test if a <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code> is <a href="good.html">good</a>, i.e. has precise location information
</p></div></div><div class="top"><p class="src"><a name="v:isOneLineSpan" class="def">isOneLineSpan</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>True if the span is known to straddle only one line.
 For <a href="bad.html">bad</a> <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code>, it returns False
</p></div></div><h1 id="g:9">Located
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Located" class="def">Located</a> e = <a href="SrcLoc.html#t:GenLocated">GenLocated</a> <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> e</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:RealLocated" class="def">RealLocated</a> e = <a href="SrcLoc.html#t:GenLocated">GenLocated</a> <a href="SrcLoc.html#t:RealSrcSpan">RealSrcSpan</a> e</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:GenLocated" class="def">GenLocated</a> l e </p><div class="doc"><p>We attach SrcSpans to lots of things, so let's have a datatype for it.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:L" class="def">L</a> l e</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:GenLocated" class="caption collapser" onclick="toggleSection('i:GenLocated')">Instances</p><div id="section.i:GenLocated" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable2">Typeable2</a> <a href="SrcLoc.html#t:GenLocated">GenLocated</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="SrcLoc.html#t:GenLocated">GenLocated</a> l)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> l, <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> e) =&gt; <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> l, <a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> e) =&gt; <a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> (<a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> l, <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> e) =&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Outputable.html#t:Outputable">Outputable</a> l, <a href="Outputable.html#t:Outputable">Outputable</a> e) =&gt; <a href="Outputable.html#t:Outputable">Outputable</a> (<a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:10">Constructing Located
</h2><div class="top"><p class="src"><a name="v:noLoc" class="def">noLoc</a> ::  e -&gt; <a href="SrcLoc.html#t:Located">Located</a> e</p></div><div class="top"><p class="src"><a name="v:mkGeneralLocated" class="def">mkGeneralLocated</a> ::  <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> -&gt; e -&gt; <a href="SrcLoc.html#t:Located">Located</a> e</p></div><h2 id="g:11">Deconstructing Located
</h2><div class="top"><p class="src"><a name="v:getLoc" class="def">getLoc</a> ::  <a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e -&gt; l</p></div><div class="top"><p class="src"><a name="v:unLoc" class="def">unLoc</a> ::  <a href="SrcLoc.html#t:GenLocated">GenLocated</a> l e -&gt; e</p></div><h2 id="g:12">Combining and comparing Located values
</h2><div class="top"><p class="src"><a name="v:eqLocated" class="def">eqLocated</a> :: <a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Tests whether the two located things are equal
</p></div></div><div class="top"><p class="src"><a name="v:cmpLocated" class="def">cmpLocated</a> :: <a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Tests the ordering of the two located things
</p></div></div><div class="top"><p class="src"><a name="v:combineLocs" class="def">combineLocs</a> ::  <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> b -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></p></div><div class="top"><p class="src"><a name="v:addCLoc" class="def">addCLoc</a> ::  <a href="SrcLoc.html#t:Located">Located</a> a -&gt; <a href="SrcLoc.html#t:Located">Located</a> b -&gt; c -&gt; <a href="SrcLoc.html#t:Located">Located</a> c</p><div class="doc"><p>Combine locations from two <code><a href="SrcLoc.html#t:Located">Located</a></code> things and add them to a third thing
</p></div></div><div class="top"><p class="src"><a name="v:leftmost_smallest" class="def">leftmost_smallest</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Alternative strategies for ordering <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code>s
</p></div></div><div class="top"><p class="src"><a name="v:leftmost_largest" class="def">leftmost_largest</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Alternative strategies for ordering <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code>s
</p></div></div><div class="top"><p class="src"><a name="v:rightmost" class="def">rightmost</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; <a href="../base-4.5.1.0/Data-Ord.html#t:Ordering">Ordering</a></p><div class="doc"><p>Alternative strategies for ordering <code><a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></code>s
</p></div></div><div class="top"><p class="src"><a name="v:spans" class="def">spans</a> :: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a> -&gt; (<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/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Determines whether a span encloses a given line and column index
</p></div></div><div class="top"><p class="src"><a name="v:isSubspanOf" class="def">isSubspanOf</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc"><p>The span that may be enclosed by the other
</p></td></tr><tr><td class="src">-&gt; <a href="SrcLoc.html#t:SrcSpan">SrcSpan</a></td><td class="doc"><p>The span it may be enclosed by
</p></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 empty">&nbsp;</td></tr></table></div><div class="doc"><p>Determines whether a span is enclosed by another one
</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>