Commit 589f4173 authored by Simon Marlow's avatar Simon Marlow
Browse files

formatting

parent caeca771
......@@ -225,7 +225,7 @@ The function @seq@ is defined by the equations:
\[\ba{l}
"@seq@ \bot b = \bot" \\
"@seq@ a b = b, if a \ne \bot" \\
\ea\]
\ea\]\ifhtml{\\}{}
@seq@ is usually introduced to improve performance by
avoiding unneeded laziness. Strict datatypes (see
\index{strictness flags}
......@@ -570,7 +570,7 @@ Instances of @Functor@ should satisfy the following laws:
\[\ba{lcl}
@fmap id@&=&@id@\\
@fmap (f . g)@&=&@fmap f . fmap g@\\
\ea\]
\ea\]\ifhtml{\\}{}
All instances of @Functor@ defined in the Prelude satisfy these laws.
......@@ -613,11 +613,11 @@ Instances of @Monad@ should satisfy the following laws:
@return a >>= k@&=&@k a@ \\
@m >>= return@&=&@m@ \\
@m >>= (\x -> k x >>= h)@&=&@(m >>= k) >>= h@\\
\ea\]
\ea\]\ifhtml{\\}{}
Instances of both @Monad@ and @Functor@ should additionally satisfy the law:
\[\ba{lcl}
@fmap f xs@&=&@xs >>= return . f@\\
\ea\]
\ea\]\ifhtml{\\}{}
All instances of @Monad@ defined in the Prelude satisfy these laws.
The Prelude provides the following auxiliary functions:
......
......@@ -721,11 +721,11 @@ described in Chapter~\ref{declarations}. Pattern bindings are matched
lazily; an implicit @~@ makes these patterns
irrefutable.\index{irrefutable pattern}
For example,
\bprog
@
let (x,y) = undefined in @"e"@
@
\eprog
\bt{l}
@let (x,y) = undefined in @"e"
\et
does not cause an execution-time error until @x@ or @y@ is evaluated.
\outline{\ifhtml{}{\small}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment