Sophie

Sophie

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

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
>Prelude</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
></HEAD
><BODY
><DIV CLASS="outer"
><DIV CLASS="mini-topbar"
>Prelude</DIV
><DIV CLASS="mini-synopsis"
><H1
>Standard types, classes and related functions
</H1
> <H2
>Basic data types
</H2
>  <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%26%26" TARGET="main"
>(&amp;&amp;)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%7C%7C" TARGET="main"
>(||)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Anot" TARGET="main"
>not</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aotherwise" TARGET="main"
>otherwise</A
></DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AMaybe" TARGET="main"
>Maybe</A
> a</DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Amaybe" TARGET="main"
>maybe</A
></DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AEither" TARGET="main"
>Either</A
> a b</DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aeither" TARGET="main"
>either</A
></DIV
>   <DIV CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AString" TARGET="main"
>String</A
> </DIV
> <H3
>Tuples
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Afst" TARGET="main"
>fst</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Asnd" TARGET="main"
>snd</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Acurry" TARGET="main"
>curry</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Auncurry" TARGET="main"
>uncurry</A
></DIV
> <H2
>Basic type classes
</H2
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AEq" TARGET="main"
>Eq</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AOrd" TARGET="main"
>Ord</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AEnum" TARGET="main"
>Enum</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3ABounded" TARGET="main"
>Bounded</A
> a</DIV
> <H2
>Numbers
</H2
> <H3
>Numeric types
</H3
>     <DIV CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
>&nbsp;<A HREF="Prelude.html#t%3ARational" TARGET="main"
>Rational</A
> </DIV
> <H3
>Numeric type classes
</H3
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3ANum" TARGET="main"
>Num</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AReal" TARGET="main"
>Real</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AIntegral" TARGET="main"
>Integral</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AFractional" TARGET="main"
>Fractional</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AFloating" TARGET="main"
>Floating</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3ARealFrac" TARGET="main"
>RealFrac</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3ARealFloat" TARGET="main"
>RealFloat</A
> a</DIV
> <H3
>Numeric functions
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Asubtract" TARGET="main"
>subtract</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aeven" TARGET="main"
>even</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aodd" TARGET="main"
>odd</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Agcd" TARGET="main"
>gcd</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Alcm" TARGET="main"
>lcm</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%5E" TARGET="main"
>(^)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%5E%5E" TARGET="main"
>(^^)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AfromIntegral" TARGET="main"
>fromIntegral</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3ArealToFrac" TARGET="main"
>realToFrac</A
></DIV
> <H2
>Monads and functors
</H2
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AMonad" TARGET="main"
>Monad</A
> m</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AFunctor" TARGET="main"
>Functor</A
> f</DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AmapM" TARGET="main"
>mapM</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AmapM_" TARGET="main"
>mapM_</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Asequence" TARGET="main"
>sequence</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Asequence_" TARGET="main"
>sequence_</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%3D%3C%3C" TARGET="main"
>(=&lt;&lt;)</A
></DIV
> <H2
>Miscellaneous functions
</H2
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aid" TARGET="main"
>id</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aconst" TARGET="main"
>const</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A." TARGET="main"
>(.)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aflip" TARGET="main"
>flip</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%24" TARGET="main"
>($)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Auntil" TARGET="main"
>until</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AasTypeOf" TARGET="main"
>asTypeOf</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aerror" TARGET="main"
>error</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aundefined" TARGET="main"
>undefined</A
></DIV
>  <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%24%21" TARGET="main"
>($!)</A
></DIV
> <H1
>List operations
</H1
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Amap" TARGET="main"
>map</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%2B%2B" TARGET="main"
>(++)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Afilter" TARGET="main"
>filter</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ahead" TARGET="main"
>head</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Alast" TARGET="main"
>last</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Atail" TARGET="main"
>tail</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ainit" TARGET="main"
>init</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Anull" TARGET="main"
>null</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Alength" TARGET="main"
>length</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3A%21%21" TARGET="main"
>(!!)</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Areverse" TARGET="main"
>reverse</A
></DIV
> <H2
>Reducing lists (folds)
</H2
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Afoldl" TARGET="main"
>foldl</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Afoldl1" TARGET="main"
>foldl1</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Afoldr" TARGET="main"
>foldr</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Afoldr1" TARGET="main"
>foldr1</A
></DIV
> <H3
>Special folds
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aand" TARGET="main"
>and</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aor" TARGET="main"
>or</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aany" TARGET="main"
>any</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aall" TARGET="main"
>all</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Asum" TARGET="main"
>sum</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aproduct" TARGET="main"
>product</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aconcat" TARGET="main"
>concat</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AconcatMap" TARGET="main"
>concatMap</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Amaximum" TARGET="main"
>maximum</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aminimum" TARGET="main"
>minimum</A
></DIV
> <H2
>Building lists
</H2
> <H3
>Scans
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ascanl" TARGET="main"
>scanl</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ascanl1" TARGET="main"
>scanl1</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ascanr" TARGET="main"
>scanr</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ascanr1" TARGET="main"
>scanr1</A
></DIV
> <H3
>Infinite lists
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aiterate" TARGET="main"
>iterate</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Arepeat" TARGET="main"
>repeat</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Areplicate" TARGET="main"
>replicate</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Acycle" TARGET="main"
>cycle</A
></DIV
> <H2
>Sublists
</H2
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Atake" TARGET="main"
>take</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Adrop" TARGET="main"
>drop</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AsplitAt" TARGET="main"
>splitAt</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AtakeWhile" TARGET="main"
>takeWhile</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AdropWhile" TARGET="main"
>dropWhile</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aspan" TARGET="main"
>span</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Abreak" TARGET="main"
>break</A
></DIV
> <H2
>Searching lists
</H2
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aelem" TARGET="main"
>elem</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AnotElem" TARGET="main"
>notElem</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Alookup" TARGET="main"
>lookup</A
></DIV
> <H2
>Zipping and unzipping lists
</H2
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Azip" TARGET="main"
>zip</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Azip3" TARGET="main"
>zip3</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AzipWith" TARGET="main"
>zipWith</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AzipWith3" TARGET="main"
>zipWith3</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aunzip" TARGET="main"
>unzip</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aunzip3" TARGET="main"
>unzip3</A
></DIV
> <H2
>Functions on strings
</H2
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Alines" TARGET="main"
>lines</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Awords" TARGET="main"
>words</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aunlines" TARGET="main"
>unlines</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aunwords" TARGET="main"
>unwords</A
></DIV
> <H1
>Converting to and from <TT
>String</TT
>
</H1
> <H2
>Converting to <TT
>String</TT
>
</H2
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AShowS" TARGET="main"
>ShowS</A
> </DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AShow" TARGET="main"
>Show</A
> a</DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ashows" TARGET="main"
>shows</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AshowChar" TARGET="main"
>showChar</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AshowString" TARGET="main"
>showString</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AshowParen" TARGET="main"
>showParen</A
></DIV
> <H2
>Converting from <TT
>String</TT
>
</H2
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AReadS" TARGET="main"
>ReadS</A
> a</DIV
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
>&nbsp;<A HREF="Prelude.html#t%3ARead" TARGET="main"
>Read</A
> a</DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Areads" TARGET="main"
>reads</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AreadParen" TARGET="main"
>readParen</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aread" TARGET="main"
>read</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Alex" TARGET="main"
>lex</A
></DIV
> <H1
>Basic Input and output
</H1
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AIO" TARGET="main"
>IO</A
> a</DIV
> <H2
>Simple I/O operations
</H2
> <H3
>Output functions
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AputChar" TARGET="main"
>putChar</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AputStr" TARGET="main"
>putStr</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AputStrLn" TARGET="main"
>putStrLn</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Aprint" TARGET="main"
>print</A
></DIV
> <H3
>Input functions
</H3
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AgetChar" TARGET="main"
>getChar</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AgetLine" TARGET="main"
>getLine</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AgetContents" TARGET="main"
>getContents</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Ainteract" TARGET="main"
>interact</A
></DIV
> <H3
>Files
</H3
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AFilePath" TARGET="main"
>FilePath</A
> </DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AreadFile" TARGET="main"
>readFile</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AwriteFile" TARGET="main"
>writeFile</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AappendFile" TARGET="main"
>appendFile</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AreadIO" TARGET="main"
>readIO</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AreadLn" TARGET="main"
>readLn</A
></DIV
> <H2
>Exception handling in the I/O monad
</H2
> <DIV CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
>&nbsp;<A HREF="Prelude.html#t%3AIOError" TARGET="main"
>IOError</A
> </DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AioError" TARGET="main"
>ioError</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3AuserError" TARGET="main"
>userError</A
></DIV
> <DIV CLASS="decl"
><A HREF="Prelude.html#v%3Acatch" TARGET="main"
>catch</A
></DIV
></DIV
></DIV
></BODY
></HTML
>