Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > a754cb499dfee5e1f453d3b6cc13d4c8 > files > 93

ghc-cmdargs-devel-0.9.3-1.fc17.i686.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>System.Console.CmdArgs.Text</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_System-Console-CmdArgs-Text.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-Console-CmdArgs-Text.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">cmdargs-0.9.3: Command line argument processing</p></div><div id="content"><div id="module-header"><p class="caption">System.Console.CmdArgs.Text</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A module to represent text with very basic formatting. Values are of
   type [<code><a href="System-Console-CmdArgs-Text.html#t:Text">Text</a></code>] and shown with <code><a href="System-Console-CmdArgs-Text.html#v:showText">showText</a></code>.
</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 <code>putStrLn (<code><a href="System-Console-CmdArgs-Text.html#v:showText">showText</a></code> (<code><a href="System-Console-CmdArgs-Text.html#v:Wrap">Wrap</a></code> 50) demo)</code> 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></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:TextFormat">TextFormat</a> <ul class="subs"><li>= <a href="#v:HTML">HTML</a>  </li><li>| <a href="#v:Wrap">Wrap</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>  </li></ul></li><li class="src short"><a href="#v:defaultWrap">defaultWrap</a> :: <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Text">Text</a> <ul class="subs"><li>= <a href="#v:Line">Line</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>  </li><li>| <a href="#v:Cols">Cols</a> [<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>]  </li></ul></li><li class="src short"><a href="#v:showText">showText</a> :: <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a> -&gt; [<a href="System-Console-CmdArgs-Text.html#t:Text">Text</a>] -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:TextFormat" class="def">TextFormat</a>  <a href="src/System-Console-CmdArgs-Text.html#TextFormat" class="link">Source</a></p><div class="doc"><p>How to output the text.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HTML" class="def">HTML</a></td><td class="doc"><p>Display as HTML.
</p></td></tr><tr><td class="src"><a name="v:Wrap" class="def">Wrap</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Display as text wrapped at a certain width (see <code><a href="System-Console-CmdArgs-Text.html#v:defaultWrap">defaultWrap</a></code>).
</p></td></tr></table></div><div class="subs instances"><p id="control.i:TextFormat" class="caption collapser" onclick="toggleSection('i:TextFormat')">Instances</p><div id="section.i:TextFormat" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="System-Console-CmdArgs-Default.html#t:Default">Default</a> <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:defaultWrap" class="def">defaultWrap</a> :: <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a><a href="src/System-Console-CmdArgs-Text.html#defaultWrap" class="link">Source</a></p><div class="doc"><p>Wrap with the default width of 80 characters.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Text" class="def">Text</a>  <a href="src/System-Console-CmdArgs-Text.html#Text" class="link">Source</a></p><div class="doc"><p>The data type representing some text, typically used as <code>[Text]</code>. The formatting
   is described by:
</p><ul><li> <code><a href="System-Console-CmdArgs-Text.html#v:Line">Line</a></code> values represent a paragraph of text, and may be wrapped depending on the <code><a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a></code>.
     If a <code><a href="System-Console-CmdArgs-Text.html#v:Line">Line</a></code> value is wrapped then all leading space will be treated as an indent.
</li><li> <code><a href="System-Console-CmdArgs-Text.html#v:Cols">Cols</a></code> values represent columns of text. Within any <code>[Text]</code> 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></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Line" class="def">Line</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Cols" class="def">Cols</a> [<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Text" class="caption collapser" onclick="toggleSection('i:Text')">Instances</p><div id="section.i:Text" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="System-Console-CmdArgs-Text.html#t:Text">Text</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:showText" class="def">showText</a> :: <a href="System-Console-CmdArgs-Text.html#t:TextFormat">TextFormat</a> -&gt; [<a href="System-Console-CmdArgs-Text.html#t:Text">Text</a>] -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/System-Console-CmdArgs-Text.html#showText" class="link">Source</a></p><div class="doc"><p>Show some text using the given formatting.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>