Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 70ec89744a04da80369b4702b2c37256 > files > 722

ghc-doc-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
>DataCon</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_DataCon.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"
>DataCon</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 types
</A
></DT
><DD
><DL
><DT
><A HREF="#2"
>Type construction
</A
></DT
><DT
><A HREF="#3"
>Type deconstruction
</A
></DT
><DT
><A HREF="#4"
>Predicates on DataCons
</A
></DT
></DL
></DD
><DT
><A HREF="#5"
>Splitting product types
</A
></DT
></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"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ADataCon"
>DataCon</A
> </TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ADataConIds"
>DataConIds</A
>  = <A HREF="#v%3ADCIds"
>DCIds</A
> (<A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Var.html#t%3AId"
>Id</A
>) <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3AConTag"
>ConTag</A
> = <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%3AmkDataCon"
>mkDataCon</A
> :: <A HREF="Name.html#t%3AName"
>Name</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>] -&gt; [<A HREF="TyCon.html#t%3AFieldLabel"
>FieldLabel</A
>] -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>] -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>] -&gt; [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)] -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
> -&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>] -&gt; <A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
> -&gt; <A HREF="DataCon.html#t%3ADataConIds"
>DataConIds</A
> -&gt; <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfIRST_TAG"
>fIRST_TAG</A
> :: <A HREF="DataCon.html#t%3AConTag"
>ConTag</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConRepType"
>dataConRepType</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConSig"
>dataConSig</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; ([<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>], <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="Type.html#t%3AType"
>Type</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConFullSig"
>dataConFullSig</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; ([<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>], [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>], [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)], <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
>, <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="Type.html#t%3AType"
>Type</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConName"
>dataConName</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Name.html#t%3AName"
>Name</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConIdentity"
>dataConIdentity</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="../base/Data-Word.html#t%3AWord8"
>Word8</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConTag"
>dataConTag</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="DataCon.html#t%3AConTag"
>ConTag</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConTyCon"
>dataConTyCon</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConUserType"
>dataConUserType</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConUnivTyVars"
>dataConUnivTyVars</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConExTyVars"
>dataConExTyVars</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConAllTyVars"
>dataConAllTyVars</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConEqSpec"
>dataConEqSpec</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AeqSpecPreds"
>eqSpecPreds</A
> :: [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)] -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConEqTheta"
>dataConEqTheta</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConDictTheta"
>dataConDictTheta</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConStupidTheta"
>dataConStupidTheta</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConInstArgTys"
>dataConInstArgTys</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Type.html#t%3AType"
>Type</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%3AdataConOrigArgTys"
>dataConOrigArgTys</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConOrigResTy"
>dataConOrigResTy</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConInstOrigArgTys"
>dataConInstOrigArgTys</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Type.html#t%3AType"
>Type</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%3AdataConRepArgTys"
>dataConRepArgTys</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConFieldLabels"
>dataConFieldLabels</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="TyCon.html#t%3AFieldLabel"
>FieldLabel</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConFieldType"
>dataConFieldType</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="TyCon.html#t%3AFieldLabel"
>FieldLabel</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%3AdataConStrictMarks"
>dataConStrictMarks</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConExStricts"
>dataConExStricts</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConSourceArity"
>dataConSourceArity</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="BasicTypes.html#t%3AArity"
>Arity</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConRepArity"
>dataConRepArity</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConIsInfix"
>dataConIsInfix</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AdataConWorkId"
>dataConWorkId</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConWrapId"
>dataConWrapId</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConWrapId_maybe"
>dataConWrapId_maybe</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConImplicitIds"
>dataConImplicitIds</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3AId"
>Id</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdataConRepStrictness"
>dataConRepStrictness</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisNullarySrcDataCon"
>isNullarySrcDataCon</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AisNullaryRepDataCon"
>isNullaryRepDataCon</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AisTupleCon"
>isTupleCon</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AisUnboxedTupleCon"
>isUnboxedTupleCon</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AisVanillaDataCon"
>isVanillaDataCon</A
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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%3AclassDataCon"
>classDataCon</A
> :: <A HREF="Class.html#t%3AClass"
>Class</A
> -&gt; <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsplitProductType_maybe"
>splitProductType_maybe</A
> :: <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsplitProductType"
>splitProductType</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdeepSplitProductType"
>deepSplitProductType</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdeepSplitProductType_maybe"
>deepSplitProductType_maybe</A
> :: <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</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 types
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:DataCon"
><A NAME="t%3ADataCon"
></A
></A
><B
>DataCon</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>A data constructor
</TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:DataCon')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:DataCon" 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="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Data-Ord.html#t%3AOrd"
>Ord</A
> <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="../base/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Name.html#t%3ANamedThing"
>NamedThing</A
> <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:DataConIds"
><A NAME="t%3ADataConIds"
></A
></A
><B
>DataConIds</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>Contains the Ids of the data constructor functions
</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:DCIds"
><A NAME="v%3ADCIds"
></A
></A
><B
>DCIds</B
> (<A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Var.html#t%3AId"
>Id</A
>) <A HREF="Var.html#t%3AId"
>Id</A
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:ConTag"
><A NAME="t%3AConTag"
></A
></A
><B
>ConTag</B
> = <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="doc"
>Type of the tags associated with each constructor possibility
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="2"
><A NAME="2"
>Type construction
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:mkDataCon"
><A NAME="v%3AmkDataCon"
></A
></A
><B
>mkDataCon</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="Name.html#t%3AName"
>Name</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
>Is the constructor declared infix?
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
><TD CLASS="rdoc"
>Strictness annotations written in the source file
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="TyCon.html#t%3AFieldLabel"
>FieldLabel</A
>]</TD
><TD CLASS="rdoc"
>Field labels for the constructor, if it is a record, otherwise empty
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
><TD CLASS="rdoc"
>Universally quantified type variables
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
><TD CLASS="rdoc"
>Existentially quantified type variables
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)]</TD
><TD CLASS="rdoc"
>GADT equalities
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
><TD CLASS="rdoc"
>Theta-type occuring before the arguments proper
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>]</TD
><TD CLASS="rdoc"
>Argument types
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
></TD
><TD CLASS="rdoc"
>Type constructor we are for
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
><TD CLASS="rdoc"
>The <A HREF="stupid theta.html"
>stupid theta</A
>, context of the data declaration e.g. <TT
>data Eq a =&gt; T a ...</TT
>
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="DataCon.html#t%3ADataConIds"
>DataConIds</A
></TD
><TD CLASS="rdoc"
>The Ids of the actual builder functions
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Build a new data constructor
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:fIRST_TAG"
><A NAME="v%3AfIRST_TAG"
></A
></A
><B
>fIRST_TAG</B
> :: <A HREF="DataCon.html#t%3AConTag"
>ConTag</A
></TD
></TR
><TR
><TD CLASS="doc"
>Tags are allocated from here for real constructors
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="3"
><A NAME="3"
>Type deconstruction
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConRepType"
><A NAME="v%3AdataConRepType"
></A
></A
><B
>dataConRepType</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
></TD
></TR
><TR
><TD CLASS="doc"
>The representation type of the data constructor, i.e. the sort
 type that will represent values of this type at runtime
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConSig"
><A NAME="v%3AdataConSig"
></A
></A
><B
>dataConSig</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; ([<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>], <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="Type.html#t%3AType"
>Type</A
>)</TD
></TR
><TR
><TD CLASS="doc"
><P
>The &quot;signature&quot; of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> returns, in order:
</P
><P
>1) The result of <TT
><A HREF="DataCon.html#v%3AdataConAllTyVars"
>dataConAllTyVars</A
></TT
>,
</P
><P
>2) All the <TT
><A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TT
>s relating to the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> (coercion, dictionary, implicit
    parameter - whatever)
</P
><P
>3) The type arguments to the constructor
</P
><P
>4) The <EM
>original</EM
> result type of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConFullSig"
><A NAME="v%3AdataConFullSig"
></A
></A
><B
>dataConFullSig</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; ([<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>], [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>], [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)], <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
>, <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="Type.html#t%3AType"
>Type</A
>)</TD
></TR
><TR
><TD CLASS="doc"
><P
>The &quot;full signature&quot; of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> returns, in order:
</P
><P
>1) The result of <TT
><A HREF="DataCon.html#v%3AdataConUnivTyVars"
>dataConUnivTyVars</A
></TT
>
</P
><P
>2) The result of <TT
><A HREF="DataCon.html#v%3AdataConExTyVars"
>dataConExTyVars</A
></TT
>
</P
><P
>3) The result of <TT
><A HREF="DataCon.html#v%3AdataConEqSpec"
>dataConEqSpec</A
></TT
>
</P
><P
>4) The result of <TT
><A HREF="DataCon.html#v%3AdataConDictTheta"
>dataConDictTheta</A
></TT
>
</P
><P
>5) The original argument types to the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> (i.e. before any change of the representation of the type)
</P
><P
>6) The original result type of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConName"
><A NAME="v%3AdataConName"
></A
></A
><B
>dataConName</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Name.html#t%3AName"
>Name</A
></TD
></TR
><TR
><TD CLASS="doc"
>The <TT
><A HREF="Name.html#t%3AName"
>Name</A
></TT
> of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>, giving it a unique, rooted identification
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConIdentity"
><A NAME="v%3AdataConIdentity"
></A
></A
><B
>dataConIdentity</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="../base/Data-Word.html#t%3AWord8"
>Word8</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>The string <TT
>package:module.name</TT
> identifying a constructor, which is attached
 to its info table and used by the GHCi debugger and the heap profiler
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConTag"
><A NAME="v%3AdataConTag"
></A
></A
><B
>dataConTag</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="DataCon.html#t%3AConTag"
>ConTag</A
></TD
></TR
><TR
><TD CLASS="doc"
>The tag used for ordering <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>s
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConTyCon"
><A NAME="v%3AdataConTyCon"
></A
></A
><B
>dataConTyCon</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
></TD
></TR
><TR
><TD CLASS="doc"
>The type constructor that we are building via this data constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConUserType"
><A NAME="v%3AdataConUserType"
></A
></A
><B
>dataConUserType</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>The user-declared type of the data constructor
 in the nice-to-read form:
</P
><PRE
> T :: forall a b. a -&gt; b -&gt; T [a]
</PRE
><P
>rather than:
</P
><PRE
> T :: forall a c. forall b. (c=[a]) =&gt; a -&gt; b -&gt; T c
</PRE
><P
>NB: If the constructor is part of a data instance, the result type
 mentions the family tycon, not the internal one.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConUnivTyVars"
><A NAME="v%3AdataConUnivTyVars"
></A
></A
><B
>dataConUnivTyVars</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>The universally-quantified type variables of the constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConExTyVars"
><A NAME="v%3AdataConExTyVars"
></A
></A
><B
>dataConExTyVars</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>The existentially-quantified type variables of the constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConAllTyVars"
><A NAME="v%3AdataConAllTyVars"
></A
></A
><B
>dataConAllTyVars</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Both the universal and existentiatial type variables of the constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConEqSpec"
><A NAME="v%3AdataConEqSpec"
></A
></A
><B
>dataConEqSpec</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)]</TD
></TR
><TR
><TD CLASS="doc"
>Equalities derived from the result type of the data constructor, as written
 by the programmer in any GADT declaration
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:eqSpecPreds"
><A NAME="v%3AeqSpecPreds"
></A
></A
><B
>eqSpecPreds</B
> :: [(<A HREF="Var.html#t%3ATyVar"
>TyVar</A
>, <A HREF="Type.html#t%3AType"
>Type</A
>)] -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConEqTheta"
><A NAME="v%3AdataConEqTheta"
></A
></A
><B
>dataConEqTheta</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="doc"
>The equational constraints on the data constructor type
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConDictTheta"
><A NAME="v%3AdataConDictTheta"
></A
></A
><B
>dataConDictTheta</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="doc"
>The type class and implicit parameter contsraints on the data constructor type
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConStupidTheta"
><A NAME="v%3AdataConStupidTheta"
></A
></A
><B
>dataConStupidTheta</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AThetaType"
>ThetaType</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>The &quot;stupid theta&quot; of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>, such as <TT
>data Eq a</TT
> in:
</P
><PRE
> data Eq a =&gt; T a = ...
</PRE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConInstArgTys"
><A NAME="v%3AdataConInstArgTys"
></A
></A
><B
>dataConInstArgTys</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
><TD CLASS="rdoc"
>A datacon with no existentials or equality constraints
 However, it can have a dcTheta (notably it can be a 
 class dictionary, with superclasses)
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>]</TD
><TD CLASS="rdoc"
>Instantiated at these types
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>]</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Finds the instantiated types of the arguments required to construct a <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> representation
 NB: these INCLUDE any dictionary args
     but EXCLUDE the data-declaration context, which is discarded
 It's all post-flattening etc; this is a representation type
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConOrigArgTys"
><A NAME="v%3AdataConOrigArgTys"
></A
></A
><B
>dataConOrigArgTys</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Returns the argument types of the wrapper, excluding all dictionary arguments
 and without substituting for any type variables
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConOrigResTy"
><A NAME="v%3AdataConOrigResTy"
></A
></A
><B
>dataConOrigResTy</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConInstOrigArgTys"
><A NAME="v%3AdataConInstOrigArgTys"
></A
></A
><B
>dataConInstOrigArgTys</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>] -&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Returns just the instantiated <EM
>value</EM
> argument types of a <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>,
 (excluding dictionary args)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConRepArgTys"
><A NAME="v%3AdataConRepArgTys"
></A
></A
><B
>dataConRepArgTys</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Type.html#t%3AType"
>Type</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Returns the arg types of the worker, including all dictionaries, after any 
 flattening has been done and without substituting for any type variables
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConFieldLabels"
><A NAME="v%3AdataConFieldLabels"
></A
></A
><B
>dataConFieldLabels</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="TyCon.html#t%3AFieldLabel"
>FieldLabel</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>The labels for the fields of this particular <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConFieldType"
><A NAME="v%3AdataConFieldType"
></A
></A
><B
>dataConFieldType</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="TyCon.html#t%3AFieldLabel"
>FieldLabel</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
></TD
></TR
><TR
><TD CLASS="doc"
>Extract the type for any given labelled field of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConStrictMarks"
><A NAME="v%3AdataConStrictMarks"
></A
></A
><B
>dataConStrictMarks</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>The strictness markings decided on by the compiler.  Does not include those for
 existential dictionaries.  The list is in one-to-one correspondence with the arity of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConExStricts"
><A NAME="v%3AdataConExStricts"
></A
></A
><B
>dataConExStricts</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Strictness of <EM
>existential</EM
> arguments only
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConSourceArity"
><A NAME="v%3AdataConSourceArity"
></A
></A
><B
>dataConSourceArity</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="BasicTypes.html#t%3AArity"
>Arity</A
></TD
></TR
><TR
><TD CLASS="doc"
>Source-level arity of the data constructor
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConRepArity"
><A NAME="v%3AdataConRepArity"
></A
></A
><B
>dataConRepArity</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="doc"
>Gives the number of actual fields in the <EM
>representation</EM
> of the 
 data constructor. This may be more than appear in the source code;
 the extra ones are the existentially quantified dictionaries
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConIsInfix"
><A NAME="v%3AdataConIsInfix"
></A
></A
><B
>dataConIsInfix</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Should the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> be presented infix?
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConWorkId"
><A NAME="v%3AdataConWorkId"
></A
></A
><B
>dataConWorkId</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="doc"
>Get the Id of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> worker: a function that is the <A HREF="actual.html"
>actual</A
>
 constructor and has no top level binding in the program. The type may
 be different from the obvious one written in the source program. Panics
 if there is no such <TT
><A HREF="Var.html#t%3AId"
>Id</A
></TT
> for this <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConWrapId"
><A NAME="v%3AdataConWrapId"
></A
></A
><B
>dataConWrapId</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="doc"
>Returns an Id which looks like the Haskell-source constructor by using
 the wrapper if it exists (see <TT
><A HREF="DataCon.html#v%3AdataConWrapId_maybe"
>dataConWrapId_maybe</A
></TT
>) and failing over to
 the worker (see <TT
><A HREF="DataCon.html#v%3AdataConWorkId"
>dataConWorkId</A
></TT
>)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConWrapId_maybe"
><A NAME="v%3AdataConWrapId_maybe"
></A
></A
><B
>dataConWrapId_maybe</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Var.html#t%3AId"
>Id</A
></TD
></TR
><TR
><TD CLASS="doc"
>Get the Id of the <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
> wrapper: a function that wraps the <A HREF="actual.html"
>actual</A
>
 constructor so it has the type visible in the source program: c.f. <TT
><A HREF="DataCon.html#v%3AdataConWorkId"
>dataConWorkId</A
></TT
>.
 Returns Nothing if there is no wrapper, which occurs for an algebraic data constructor 
 and also for a newtype (whose constructor is inlined compulsorily)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConImplicitIds"
><A NAME="v%3AdataConImplicitIds"
></A
></A
><B
>dataConImplicitIds</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="Var.html#t%3AId"
>Id</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Find all the <TT
><A HREF="Var.html#t%3AId"
>Id</A
></TT
>s implicitly brought into scope by the data constructor. Currently,
 the union of the <TT
><A HREF="DataCon.html#v%3AdataConWorkId"
>dataConWorkId</A
></TT
> and the <TT
><A HREF="DataCon.html#v%3AdataConWrapId"
>dataConWrapId</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:dataConRepStrictness"
><A NAME="v%3AdataConRepStrictness"
></A
></A
><B
>dataConRepStrictness</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; [<A HREF="BasicTypes.html#t%3AStrictnessMark"
>StrictnessMark</A
>]</TD
></TR
><TR
><TD CLASS="doc"
>Give the demands on the arguments of a
 Core constructor application (Con dc args)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section2"
><A NAME="4"
><A NAME="4"
>Predicates on DataCons
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isNullarySrcDataCon"
><A NAME="v%3AisNullarySrcDataCon"
></A
></A
><B
>isNullarySrcDataCon</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Return whether there are any argument types for this <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>s original source type
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isNullaryRepDataCon"
><A NAME="v%3AisNullaryRepDataCon"
></A
></A
><B
>isNullaryRepDataCon</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Return whether there are any argument types for this <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>s runtime representation type
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isTupleCon"
><A NAME="v%3AisTupleCon"
></A
></A
><B
>isTupleCon</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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:isUnboxedTupleCon"
><A NAME="v%3AisUnboxedTupleCon"
></A
></A
><B
>isUnboxedTupleCon</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</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:isVanillaDataCon"
><A NAME="v%3AisVanillaDataCon"
></A
></A
><B
>isVanillaDataCon</B
> :: <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
>Vanilla <TT
><A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TT
>s are those that are nice boring Haskell 98 constructors
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:classDataCon"
><A NAME="v%3AclassDataCon"
></A
></A
><B
>classDataCon</B
> :: <A HREF="Class.html#t%3AClass"
>Class</A
> -&gt; <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="5"
><A NAME="5"
>Splitting product types
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:splitProductType_maybe"
><A NAME="v%3AsplitProductType_maybe"
></A
></A
><B
>splitProductType_maybe</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="Type.html#t%3AType"
>Type</A
></TD
><TD CLASS="rdoc"
>A product type, perhaps
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Extract the type constructor, type argument, data constructor and it's
 <EM
>representation</EM
> argument types from a type if it is a product type.
</P
><P
>Precisely, we return <TT
>Just</TT
> for any type that is all of:
</P
><UL
><LI
> Concrete (i.e. constructors visible)
</LI
><LI
> Single-constructor
</LI
><LI
> Not existentially quantified
</LI
></UL
><P
>Whether the type is a <TT
>data</TT
> type or a <TT
>newtype</TT
>
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:splitProductType"
><A NAME="v%3AsplitProductType"
></A
></A
><B
>splitProductType</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
></TR
><TR
><TD CLASS="doc"
>As <TT
><A HREF="DataCon.html#v%3AsplitProductType_maybe"
>splitProductType_maybe</A
></TT
>, but panics if the <TT
><A HREF="Type.html#t%3AType"
>Type</A
></TT
> is not a product type
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:deepSplitProductType"
><A NAME="v%3AdeepSplitProductType"
></A
></A
><B
>deepSplitProductType</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
></TR
><TR
><TD CLASS="doc"
>As <TT
><A HREF="DataCon.html#v%3AdeepSplitProductType_maybe"
>deepSplitProductType_maybe</A
></TT
>, but panics if the <TT
><A HREF="Type.html#t%3AType"
>Type</A
></TT
> is not a product type
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:deepSplitProductType_maybe"
><A NAME="v%3AdeepSplitProductType_maybe"
></A
></A
><B
>deepSplitProductType_maybe</B
> :: <A HREF="Type.html#t%3AType"
>Type</A
> -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>], <A HREF="DataCon.html#t%3ADataCon"
>DataCon</A
>, [<A HREF="Type.html#t%3AType"
>Type</A
>])</TD
></TR
><TR
><TD CLASS="doc"
>As <TT
><A HREF="DataCon.html#v%3AsplitProductType_maybe"
>splitProductType_maybe</A
></TT
>, but in turn instantiates the <TT
><A HREF="TyCon.html#t%3ATyCon"
>TyCon</A
></TT
> returned
 and hence recursively tries to unpack it as far as it able to
</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
>