Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 77f0c8b2568c8ba86bf4498d38e7ecdc > files > 756

ghc-base-devel-4.2.0.2-8.6.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
>Data.Functor</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_Data-Functor.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"
>base-4.2.0.2: Basic libraries</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"
>Data.Functor</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>portable</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>provisional</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>libraries@haskell.org</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Functors: uniform action over a parameterized type, generalizing the
 map function on lists.
</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"
>class</SPAN
>  <A HREF="#t%3AFunctor"
>Functor</A
> f  <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3Afmap"
>fmap</A
> ::  (a -&gt; b) -&gt; f a -&gt; f b</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%3C%24"
>(&lt;$)</A
> ::  a -&gt; f b -&gt; f a</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%3C%24%3E"
>(&lt;$&gt;)</A
> :: <A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> f =&gt; (a -&gt; b) -&gt; f a -&gt; f b</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="decl"
><SPAN CLASS="keyword"
>class</SPAN
>  <A NAME="t:Functor"
><A NAME="t%3AFunctor"
></A
></A
><B
>Functor</B
> f  <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
><P
>The <TT
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
></TT
> class is used for types that can be mapped over.
Instances of <TT
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
></TT
> should satisfy the following laws:
</P
><PRE
> fmap id  ==  id
 fmap (f . g)  ==  fmap f . fmap g
</PRE
><P
>The instances of <TT
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
></TT
> for lists, Data.Maybe.Maybe and System.IO.IO
defined in the <A HREF="Prelude.html"
>Prelude</A
> satisfy these laws.
</P
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
>Methods</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A NAME="v:fmap"
><A NAME="v%3Afmap"
></A
></A
><B
>fmap</B
> ::  (a -&gt; b) -&gt; f a -&gt; f b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:<$"
><A NAME="v%3A%3C%24"
></A
></A
><B
>(&lt;$)</B
> ::  a -&gt; f b -&gt; f a</TD
></TR
><TR
><TD CLASS="doc"
>Replace all locations in the input with the same value.
 The default definition is <TT
><TT
><A HREF="Data-Functor.html#v%3Afmap"
>fmap</A
></TT
> . <TT
><A HREF="Prelude.html#v%3Aconst"
>const</A
></TT
></TT
>, but this may be
 overridden with a more efficient version.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Functor')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Functor" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> []</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> <A HREF="System-IO.html#t%3AIO"
>IO</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> [::]</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> <A HREF="Data-Maybe.html#t%3AMaybe"
>Maybe</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> <A HREF="Text-ParserCombinators-ReadP.html#t%3AReadP"
>ReadP</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> <A HREF="Text-ParserCombinators-ReadPrec.html#t%3AReadPrec"
>ReadPrec</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> <A HREF="GHC-Conc.html#t%3ASTM"
>STM</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> <A HREF="Control-Applicative.html#t%3AZipList"
>ZipList</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> Id</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> ((-&gt;) r)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="Data-Either.html#t%3AEither"
>Either</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="../ghc-prim-0.2.0.0/GHC-Tuple.html#t%3A%28%2C%29"
>(,)</A
> a)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="Control-Monad-ST.html#t%3AST"
>ST</A
> s)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Ix.html#t%3AIx"
>Ix</A
> i =&gt; <A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (Array i)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Monad.html#t%3AMonad"
>Monad</A
> m =&gt; <A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="Control-Applicative.html#t%3AWrappedMonad"
>WrappedMonad</A
> m)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="Control-Applicative.html#t%3AConst"
>Const</A
> m)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (StateR s)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (StateL s)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="Control-Monad-ST-Lazy.html#t%3AST"
>ST</A
> s)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Control-Arrow.html#t%3AArrow"
>Arrow</A
> a =&gt; <A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> (<A HREF="Control-Applicative.html#t%3AWrappedArrow"
>WrappedArrow</A
> a b)</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:<$>"
><A NAME="v%3A%3C%24%3E"
></A
></A
><B
>(&lt;$&gt;)</B
> :: <A HREF="Data-Functor.html#t%3AFunctor"
>Functor</A
> f =&gt; (a -&gt; b) -&gt; f a -&gt; f b</TD
></TR
><TR
><TD CLASS="doc"
>An infix synonym for <TT
><A HREF="Data-Functor.html#v%3Afmap"
>fmap</A
></TT
>.
</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
>