Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1f2b142b9d2ef4849a6f5316fa1c5b12 > files > 1953

ghc-6.10.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Literal</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Literal.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>ghc-6.10.4: The GHC API</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Literal</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>Main data type
</A
></DT
><DD
><DL
><DT
><A HREF="#2"
>Creating Literals
</A
></DT
><DT
><A HREF="#3"
>Operations on Literals
</A
></DT
><DT
><A HREF="#4"
>Predicates on Literals and their contents
</A
></DT
><DT
><A HREF="#5"
>Coercions
</A
></DT
></DL
></DD
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ALiteral"
>Literal</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AMachChar"
>MachChar</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachStr"
>MachStr</A
> <A HREF="FastString.html#t%3AFastString"
>FastString</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachNullAddr"
>MachNullAddr</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachInt"
>MachInt</A
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachInt64"
>MachInt64</A
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachWord"
>MachWord</A
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachWord64"
>MachWord64</A
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachFloat"
>MachFloat</A
> <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachDouble"
>MachDouble</A
> <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AMachLabel"
>MachLabel</A
> <A HREF="FastString.html#t%3AFastString"
>FastString</A
> (<A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
>) <A HREF="BasicTypes.html#t%3AFunctionOrData"
>FunctionOrData</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachInt"
>mkMachInt</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachWord"
>mkMachWord</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachInt64"
>mkMachInt64</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachWord64"
>mkMachWord64</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachFloat"
>mkMachFloat</A
> :: <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachDouble"
>mkMachDouble</A
> :: <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachChar"
>mkMachChar</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkMachString"
>mkMachString</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AlitSize"
>litSize</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AliteralType"
>literalType</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AhashLiteral"
>hashLiteral</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AlitIsDupable"
>litIsDupable</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AlitIsTrivial"
>litIsTrivial</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinIntRange"
>inIntRange</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinWordRange"
>inWordRange</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtARGET_MAX_INT"
>tARGET_MAX_INT</A
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinCharRange"
>inCharRange</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisZeroLit"
>isZeroLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AlitFitsInChar"
>litFitsInChar</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aword2IntLit"
>word2IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aint2WordLit"
>int2WordLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anarrow8IntLit"
>narrow8IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anarrow16IntLit"
>narrow16IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anarrow32IntLit"
>narrow32IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anarrow8WordLit"
>narrow8WordLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anarrow16WordLit"
>narrow16WordLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anarrow32WordLit"
>narrow32WordLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Achar2IntLit"
>char2IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aint2CharLit"
>int2CharLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afloat2IntLit"
>float2IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aint2FloatLit"
>int2FloatLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adouble2IntLit"
>double2IntLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aint2DoubleLit"
>int2DoubleLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnullAddrLit"
>nullAddrLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afloat2DoubleLit"
>float2DoubleLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adouble2FloatLit"
>double2FloatLit</A
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>Main data type
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:Literal"
><A NAME="t%3ALiteral"
></A
></A
><B
>Literal</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
><P
>So-called <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
>s are one of:
</P
><UL
><LI
> An unboxed (<EM
>machine</EM
>) literal (<TT
><A HREF="Literal.html#v%3AMachInt"
>MachInt</A
></TT
>, <TT
><A HREF="Literal.html#v%3AMachFloat"
>MachFloat</A
></TT
>, etc.),
   which is presumed to be surrounded by appropriate constructors
   (<TT
>Int#</TT
>, etc.), so that the overall thing makes sense.
</LI
><LI
> The literal derived from the label mentioned in a &quot;foreign label&quot; 
   declaration (<TT
><A HREF="Literal.html#v%3AMachLabel"
>MachLabel</A
></TT
>)
</LI
></UL
></TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:MachChar"
><A NAME="v%3AMachChar"
></A
></A
><B
>MachChar</B
> <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
></TD
><TD CLASS="rdoc"
><TT
>Char#</TT
> - at least 31 bits. Create with <TT
><A HREF="Literal.html#v%3AmkMachChar"
>mkMachChar</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachStr"
><A NAME="v%3AMachStr"
></A
></A
><B
>MachStr</B
> <A HREF="FastString.html#t%3AFastString"
>FastString</A
></TD
><TD CLASS="rdoc"
>A string-literal: stored and emitted
 UTF-8 encoded, we'll arrange to decode it
 at runtime.  Also emitted with a <TT
>'\0'</TT
>
 terminator. Create with <TT
><A HREF="Literal.html#v%3AmkMachString"
>mkMachString</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachNullAddr"
><A NAME="v%3AMachNullAddr"
></A
></A
><B
>MachNullAddr</B
></TD
><TD CLASS="rdoc"
>The <TT
>NULL</TT
> pointer, the only pointer value
 that can be represented as a Literal. Create 
 with <TT
><A HREF="Literal.html#v%3AnullAddrLit"
>nullAddrLit</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachInt"
><A NAME="v%3AMachInt"
></A
></A
><B
>MachInt</B
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
><TD CLASS="rdoc"
><TT
>Int#</TT
> - at least <TT
>WORD_SIZE_IN_BITS</TT
> bits. Create with <TT
><A HREF="Literal.html#v%3AmkMachInt"
>mkMachInt</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachInt64"
><A NAME="v%3AMachInt64"
></A
></A
><B
>MachInt64</B
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
><TD CLASS="rdoc"
><TT
>Int64#</TT
> - at least 64 bits. Create with <TT
><A HREF="Literal.html#v%3AmkMachInt64"
>mkMachInt64</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachWord"
><A NAME="v%3AMachWord"
></A
></A
><B
>MachWord</B
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
><TD CLASS="rdoc"
><TT
>Word#</TT
> - at least <TT
>WORD_SIZE_IN_BITS</TT
> bits. Create with <TT
><A HREF="Literal.html#v%3AmkMachWord"
>mkMachWord</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachWord64"
><A NAME="v%3AMachWord64"
></A
></A
><B
>MachWord64</B
> <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
><TD CLASS="rdoc"
><TT
>Word64#</TT
> - at least 64 bits. Create with <TT
><A HREF="Literal.html#v%3AmkMachWord64"
>mkMachWord64</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachFloat"
><A NAME="v%3AMachFloat"
></A
></A
><B
>MachFloat</B
> <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
></TD
><TD CLASS="rdoc"
><TT
>Float#</TT
>. Create with <TT
><A HREF="Literal.html#v%3AmkMachFloat"
>mkMachFloat</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachDouble"
><A NAME="v%3AMachDouble"
></A
></A
><B
>MachDouble</B
> <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
></TD
><TD CLASS="rdoc"
><TT
>Double#</TT
>. Create with <TT
><A HREF="Literal.html#v%3AmkMachDouble"
>mkMachDouble</A
></TT
>
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:MachLabel"
><A NAME="v%3AMachLabel"
></A
></A
><B
>MachLabel</B
> <A HREF="FastString.html#t%3AFastString"
>FastString</A
> (<A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
>) <A HREF="BasicTypes.html#t%3AFunctionOrData"
>FunctionOrData</A
></TD
><TD CLASS="rdoc"
><P
>A label literal. Parameters:
</P
><P
>1) The name of the symbol mentioned in the declaration
</P
><P
>2) The size (in bytes) of the arguments
    the label expects. Only applicable with
    <TT
>stdcall</TT
> labels. <TT
>Just x</TT
> =&gt; <TT
>&lt;x&gt;</TT
> will
    be appended to label name when emitting assembly.
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Literal')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Literal" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Ord.html#t%3AOrd"
>Ord</A
> <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Binary.html#t%3ABinary"
>Binary</A
> <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="2"
><A NAME="2"
>Creating Literals
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachInt"
><A NAME="v%3AmkMachInt"
></A
></A
><B
>mkMachInt</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Int#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachWord"
><A NAME="v%3AmkMachWord"
></A
></A
><B
>mkMachWord</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Word#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachInt64"
><A NAME="v%3AmkMachInt64"
></A
></A
><B
>mkMachInt64</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Int64#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachWord64"
><A NAME="v%3AmkMachWord64"
></A
></A
><B
>mkMachWord64</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Word64#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachFloat"
><A NAME="v%3AmkMachFloat"
></A
></A
><B
>mkMachFloat</B
> :: <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Float#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachDouble"
><A NAME="v%3AmkMachDouble"
></A
></A
><B
>mkMachDouble</B
> :: <A HREF="../base/Prelude.html#t%3ARational"
>Rational</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Double#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachChar"
><A NAME="v%3AmkMachChar"
></A
></A
><B
>mkMachChar</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Char#</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkMachString"
><A NAME="v%3AmkMachString"
></A
></A
><B
>mkMachString</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="doc"
>Creates a <TT
><A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TT
> of type <TT
>Addr#</TT
>, which is appropriate for passing to
 e.g. some of the &quot;error&quot; functions in GHC.Err such as <TT
>GHC.Err.runtimeError</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="3"
><A NAME="3"
>Operations on Literals
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:litSize"
><A NAME="v%3AlitSize"
></A
></A
><B
>litSize</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="doc"
>Finds a nominal size of a string literal. Every literal has size at least 1
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:literalType"
><A NAME="v%3AliteralType"
></A
></A
><B
>literalType</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
></TD
></TR
><TR
><TD CLASS="doc"
>Find the Haskell <TT
><A HREF="Type.html#t%3AType"
>Type</A
></TT
> the literal occupies
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:hashLiteral"
><A NAME="v%3AhashLiteral"
></A
></A
><B
>hashLiteral</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="4"
><A NAME="4"
>Predicates on Literals and their contents
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:litIsDupable"
><A NAME="v%3AlitIsDupable"
></A
></A
><B
>litIsDupable</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>True if code space does not go bad if we duplicate this literal
 Currently we treat it just like <TT
><A HREF="Literal.html#v%3AlitIsTrivial"
>litIsTrivial</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:litIsTrivial"
><A NAME="v%3AlitIsTrivial"
></A
></A
><B
>litIsTrivial</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>True if there is absolutely no penalty to duplicating the literal.
 False principally of strings
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:inIntRange"
><A NAME="v%3AinIntRange"
></A
></A
><B
>inIntRange</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:inWordRange"
><A NAME="v%3AinWordRange"
></A
></A
><B
>inWordRange</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:tARGET_MAX_INT"
><A NAME="v%3AtARGET_MAX_INT"
></A
></A
><B
>tARGET_MAX_INT</B
> :: <A HREF="../integer/GHC-Integer.html#t%3AInteger"
>Integer</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:inCharRange"
><A NAME="v%3AinCharRange"
></A
></A
><B
>inCharRange</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AChar"
>Char</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isZeroLit"
><A NAME="v%3AisZeroLit"
></A
></A
><B
>isZeroLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Tests whether the literal represents a zero of whatever type it is
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:litFitsInChar"
><A NAME="v%3AlitFitsInChar"
></A
></A
><B
>litFitsInChar</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="5"
><A NAME="5"
>Coercions
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:word2IntLit"
><A NAME="v%3Aword2IntLit"
></A
></A
><B
>word2IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:int2WordLit"
><A NAME="v%3Aint2WordLit"
></A
></A
><B
>int2WordLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:narrow8IntLit"
><A NAME="v%3Anarrow8IntLit"
></A
></A
><B
>narrow8IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:narrow16IntLit"
><A NAME="v%3Anarrow16IntLit"
></A
></A
><B
>narrow16IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:narrow32IntLit"
><A NAME="v%3Anarrow32IntLit"
></A
></A
><B
>narrow32IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:narrow8WordLit"
><A NAME="v%3Anarrow8WordLit"
></A
></A
><B
>narrow8WordLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:narrow16WordLit"
><A NAME="v%3Anarrow16WordLit"
></A
></A
><B
>narrow16WordLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:narrow32WordLit"
><A NAME="v%3Anarrow32WordLit"
></A
></A
><B
>narrow32WordLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:char2IntLit"
><A NAME="v%3Achar2IntLit"
></A
></A
><B
>char2IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:int2CharLit"
><A NAME="v%3Aint2CharLit"
></A
></A
><B
>int2CharLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:float2IntLit"
><A NAME="v%3Afloat2IntLit"
></A
></A
><B
>float2IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:int2FloatLit"
><A NAME="v%3Aint2FloatLit"
></A
></A
><B
>int2FloatLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:double2IntLit"
><A NAME="v%3Adouble2IntLit"
></A
></A
><B
>double2IntLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:int2DoubleLit"
><A NAME="v%3Aint2DoubleLit"
></A
></A
><B
>int2DoubleLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:nullAddrLit"
><A NAME="v%3AnullAddrLit"
></A
></A
><B
>nullAddrLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:float2DoubleLit"
><A NAME="v%3Afloat2DoubleLit"
></A
></A
><B
>float2DoubleLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:double2FloatLit"
><A NAME="v%3Adouble2FloatLit"
></A
></A
><B
>double2FloatLit</B
> :: <A HREF="Literal.html#t%3ALiteral"
>Literal</A
> -&gt; <A HREF="Literal.html#t%3ALiteral"
>Literal</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>