Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Haskell
prime
Commits
589f4173
Commit
589f4173
authored
Jul 08, 2010
by
Simon Marlow
Browse files
formatting
parent
caeca771
Changes
2
Show whitespace changes
Inline
Side-by-side
report/basic.verb
View file @
589f4173
...
@@ -225,7 +225,7 @@ The function @seq@ is defined by the equations:
...
@@ -225,7 +225,7 @@ The function @seq@ is defined by the equations:
\[\ba{l}
\[\ba{l}
"@seq@ \bot b = \bot" \\
"@seq@ \bot b = \bot" \\
"@seq@ a b = b, if a \ne \bot" \\
"@seq@ a b = b, if a \ne \bot" \\
\ea\]
\ea\]
\ifhtml{\\}{}
@seq@ is usually introduced to improve performance by
@seq@ is usually introduced to improve performance by
avoiding unneeded laziness. Strict datatypes (see
avoiding unneeded laziness. Strict datatypes (see
\index{strictness flags}
\index{strictness flags}
...
@@ -570,7 +570,7 @@ Instances of @Functor@ should satisfy the following laws:
...
@@ -570,7 +570,7 @@ Instances of @Functor@ should satisfy the following laws:
\[\ba{lcl}
\[\ba{lcl}
@fmap id@&=&@id@\\
@fmap id@&=&@id@\\
@fmap (f . g)@&=&@fmap f . fmap g@\\
@fmap (f . g)@&=&@fmap f . fmap g@\\
\ea\]
\ea\]
\ifhtml{\\}{}
All instances of @Functor@ defined in the Prelude satisfy these laws.
All instances of @Functor@ defined in the Prelude satisfy these laws.
...
@@ -613,11 +613,11 @@ Instances of @Monad@ should satisfy the following laws:
...
@@ -613,11 +613,11 @@ Instances of @Monad@ should satisfy the following laws:
@return a >>= k@&=&@k a@ \\
@return a >>= k@&=&@k a@ \\
@m >>= return@&=&@m@ \\
@m >>= return@&=&@m@ \\
@m >>= (\x -> k x >>= h)@&=&@(m >>= k) >>= h@\\
@m >>= (\x -> k x >>= h)@&=&@(m >>= k) >>= h@\\
\ea\]
\ea\]
\ifhtml{\\}{}
Instances of both @Monad@ and @Functor@ should additionally satisfy the law:
Instances of both @Monad@ and @Functor@ should additionally satisfy the law:
\[\ba{lcl}
\[\ba{lcl}
@fmap f xs@&=&@xs >>= return . f@\\
@fmap f xs@&=&@xs >>= return . f@\\
\ea\]
\ea\]
\ifhtml{\\}{}
All instances of @Monad@ defined in the Prelude satisfy these laws.
All instances of @Monad@ defined in the Prelude satisfy these laws.
The Prelude provides the following auxiliary functions:
The Prelude provides the following auxiliary functions:
...
...
report/exps.verb
View file @
589f4173
...
@@ -721,11 +721,11 @@ described in Chapter~\ref{declarations}. Pattern bindings are matched
...
@@ -721,11 +721,11 @@ described in Chapter~\ref{declarations}. Pattern bindings are matched
lazily; an implicit @~@ makes these patterns
lazily; an implicit @~@ makes these patterns
irrefutable.\index{irrefutable pattern}
irrefutable.\index{irrefutable pattern}
For example,
For example,
\bprog
@
\bt{l}
let (x,y) = undefined in @"e"
@
@
let (x,y) = undefined in @"e"
@
\et
\eprog
does not cause an execution-time error until @x@ or @y@ is evaluated.
does not cause an execution-time error until @x@ or @y@ is evaluated.
\outline{\ifhtml{}{\small}
\outline{\ifhtml{}{\small}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment