Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > d124509af43f859ea9fff074ae079c9c > files > 59

ghc-cmdargs-devel-0.7-2.fc14.x86_64.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
>System.Console.CmdArgs.Text</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_System-Console-CmdArgs-Text.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"
>cmdargs-0.7: Command line argument processing</TD
><TD CLASS="topbut"
><A HREF="src/System-Console-CmdArgs-Text.html"
>Source code</A
></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"
>System.Console.CmdArgs.Text</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
><P
>A module to represent text with very basic formatting. Values are of
   type [<TT
><A HREF="System-Console-CmdArgs-Text.html#t%3AText"
>Text</A
></TT
>] and shown with <TT
><A HREF="System-Console-CmdArgs-Text.html#v%3AshowText"
>showText</A
></TT
>.
</P
><P
>As an example of the formatting:
</P
><PRE
> [Line &quot;Cooking for hungry people.&quot;
 ,Line &quot;Welcome to my cookery recipe program, I sure hope you enjoy using it!&quot;
 ,Line &quot;&quot;
 ,Cols [&quot;Omlette&quot;,&quot;  A tasty eggy treat.&quot;]
 ,Cols [&quot;  -m&quot;,&quot; --mushrooms&quot;,&quot;  Some mushrooms, or in fact any other ingredients you have in the cupboards&quot;]
 ,Cols [&quot;  -e&quot;,&quot; --eggs&quot;, &quot;  But always you need eggs&quot;]
 ,Line &quot;&quot;
 ,Cols [&quot;Spagetti Bolognaise&quot;, &quot;  An Italian delight.&quot;]
 ,Cols [&quot;  -s&quot;,&quot; --spagetti&quot;,&quot;  The first word in the name&quot;]
 ,Cols [&quot;  -b&quot;,&quot; --bolognaise&quot;,&quot;  The second word in the name&quot;]
 ,Cols [&quot;  -d&quot;,&quot; --dolmio&quot;,&quot;  The magic ingredient!&quot;]
 ,Line &quot;&quot;
 ,Line &quot;    The author of this program explicitly disclaims any liability for poisoning people who get their recipes off the internet.&quot;]
</PRE
><P
>With <TT
>putStrLn (<TT
><A HREF="System-Console-CmdArgs-Text.html#v%3AshowText"
>showText</A
></TT
> (<TT
><A HREF="System-Console-CmdArgs-Text.html#v%3AWrap"
>Wrap</A
></TT
> 50) demo)</TT
> gives:
</P
><PRE
> Cooking for hungry people.
 Welcome to my cookery recipe program, I sure hope
 you enjoy using it!

 Omlette              A tasty eggy treat.
   -m --mushrooms   Some mushrooms, or in fact
                    any other ingredients you have
                    in the cupboards
   -e --eggs        But always you need eggs

 Spagetti Bolognaise  An Italian delight.
   -s --spagetti    The first word in the name
   -b --bolognaise  The second word in the name
   -d --dolmio      The magic ingredient!

     The author of this program explicitly
     disclaims any liability for poisoning people
     who get their recipes off the internet.
</PRE
></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%3ATextFormat"
>TextFormat</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AHTML"
>HTML</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AWrap"
>Wrap</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdefaultWrap"
>defaultWrap</A
> :: <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AText"
>Text</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3ALine"
>Line</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ACols"
>Cols</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AshowText"
>showText</A
> :: <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
> -&gt; [<A HREF="System-Console-CmdArgs-Text.html#t%3AText"
>Text</A
>] -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:TextFormat"
><A NAME="t%3ATextFormat"
></A
></A
><B
>TextFormat</B
>  </TD
><TD CLASS="declbut"
><A HREF="src/System-Console-CmdArgs-Text.html#TextFormat"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>How to output the text.
</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:HTML"
><A NAME="v%3AHTML"
></A
></A
><B
>HTML</B
></TD
><TD CLASS="rdoc"
>Display as HTML.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:Wrap"
><A NAME="v%3AWrap"
></A
></A
><B
>Wrap</B
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="rdoc"
>Display as text wrapped at a certain width (see <TT
><A HREF="System-Console-CmdArgs-Text.html#v%3AdefaultWrap"
>defaultWrap</A
></TT
>).
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:TextFormat')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:TextFormat" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Ord.html#t%3AOrd"
>Ord</A
> <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="System-Console-CmdArgs-Default.html#t%3ADefault"
>Default</A
> <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:defaultWrap"
><A NAME="v%3AdefaultWrap"
></A
></A
><B
>defaultWrap</B
> :: <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Console-CmdArgs-Text.html#defaultWrap"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Wrap with the default width of 80 characters.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:Text"
><A NAME="t%3AText"
></A
></A
><B
>Text</B
>  </TD
><TD CLASS="declbut"
><A HREF="src/System-Console-CmdArgs-Text.html#Text"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
><P
>The data type representing some text, typically used as <TT
>[Text]</TT
>. The formatting
   is described by:
</P
><UL
><LI
> <TT
><A HREF="System-Console-CmdArgs-Text.html#v%3ALine"
>Line</A
></TT
> values represent a paragraph of text, and may be wrapped depending on the <TT
><A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
></TT
>.
     If a <TT
><A HREF="System-Console-CmdArgs-Text.html#v%3ALine"
>Line</A
></TT
> value is wrapped then all leading space will be treated as an indent.
</LI
><LI
> <TT
><A HREF="System-Console-CmdArgs-Text.html#v%3ACols"
>Cols</A
></TT
> values represent columns of text. Within any <TT
>[Text]</TT
> all columns of the same length
     are grouped in tabs, with the final column being wrapped if necessary. All columns are placed
     adjacent with no space between them - for this reason most columns will start with a space.
</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:Line"
><A NAME="v%3ALine"
></A
></A
><B
>Line</B
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:Cols"
><A NAME="v%3ACols"
></A
></A
><B
>Cols</B
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Text')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Text" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="System-Console-CmdArgs-Text.html#t%3AText"
>Text</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:showText"
><A NAME="v%3AshowText"
></A
></A
><B
>showText</B
> :: <A HREF="System-Console-CmdArgs-Text.html#t%3ATextFormat"
>TextFormat</A
> -&gt; [<A HREF="System-Console-CmdArgs-Text.html#t%3AText"
>Text</A
>] -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="declbut"
><A HREF="src/System-Console-CmdArgs-Text.html#showText"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Show some text using the given formatting.
</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.6.1</TD
></TR
></TABLE
></BODY
></HTML
>