mirror of
https://github.com/sdiehl/wiwinwlh.git
synced 2024-10-26 20:57:32 +03:00
Write more
This commit is contained in:
parent
f1edf132d4
commit
d4cefde9c7
@ -6,8 +6,8 @@
|
||||
|
||||
\color{black}
|
||||
\begin{flushright}
|
||||
\Huge\textbf{What I Wish I Knew When Learning Haskell}\\
|
||||
\line(1,0){450} \\ \\
|
||||
\Huge\textbf{What I Wish I Knew When Learning Haskell}
|
||||
\line(1,0){450} \\
|
||||
\Large{Stephen Diehl}
|
||||
\end{flushright}
|
||||
|
||||
|
@ -22,10 +22,22 @@
|
||||
\usepackage{tikz}
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{%
|
||||
colorlinks=false, % hyperlinks will be black
|
||||
colorlinks=true, % hyperlinks will be black
|
||||
linkcolor=black,
|
||||
linkbordercolor=red, % hyperlink borders will be red
|
||||
pdfborderstyle={/S/U/W 1} % border style will be underline of width 1pt
|
||||
}
|
||||
|
||||
\newif\ifprint
|
||||
\printtrue
|
||||
\ifprint
|
||||
\let\oldhref\href
|
||||
\renewcommand\href[2]{%
|
||||
\oldhref{#1}{#2}%
|
||||
\footnote{\url{#1}}%
|
||||
}
|
||||
\fi
|
||||
|
||||
\usepackage{amssymb,amsmath}
|
||||
\usepackage{framed}
|
||||
\usepackage{fancyvrb}
|
||||
@ -173,9 +185,6 @@ $include-before$
|
||||
$endfor$
|
||||
$if(toc)$
|
||||
{
|
||||
$if(colorlinks)$
|
||||
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
|
||||
$endif$
|
||||
\setcounter{tocdepth}{$toc-depth$}
|
||||
\tableofcontents
|
||||
|
||||
|
90
tutorial.md
90
tutorial.md
@ -4958,14 +4958,6 @@ the collective programmer consciousness and can often be non-intuitive to the
|
||||
novice. Some time is often needed to fully grok how lazy evaluation works and
|
||||
how to wield it's great power and when to force strictness.
|
||||
|
||||
See:
|
||||
|
||||
* [Oh My Laziness!](http://alpmestan.com/posts/2013-10-02-oh-my-laziness.html)
|
||||
* [Reasoning about Laziness](http://www.slideshare.net/tibbe/reasoning-about-laziness)
|
||||
* [Lazy Evaluation of Haskell](http://www.vex.net/~trebla/haskell/lazy.xhtml)
|
||||
* [More Points For Lazy Evaluation](http://augustss.blogspot.hu/2011/05/more-points-for-lazy-evaluation-in.html)
|
||||
* [How Lazy Evaluation Works in Haskell](https://hackhands.com/lazy-evaluation-works-haskell/)
|
||||
|
||||
Strictness
|
||||
----------
|
||||
|
||||
@ -5290,6 +5282,15 @@ bottom, we fail at the usage site instead of the outer pattern match.
|
||||
~~~~ {.haskell include="src/05-laziness/lazy_patterns.hs"}
|
||||
~~~~
|
||||
|
||||
External Resources
|
||||
------------------
|
||||
|
||||
* [Oh My Laziness!](http://alpmestan.com/posts/2013-10-02-oh-my-laziness.html)
|
||||
* [Reasoning about Laziness](http://www.slideshare.net/tibbe/reasoning-about-laziness)
|
||||
* [Lazy Evaluation of Haskell](http://www.vex.net/~trebla/haskell/lazy.xhtml)
|
||||
* [More Points For Lazy Evaluation](http://augustss.blogspot.hu/2011/05/more-points-for-lazy-evaluation-in.html)
|
||||
* [How Lazy Evaluation Works in Haskell](https://hackhands.com/lazy-evaluation-works-haskell/)
|
||||
|
||||
<hr/>
|
||||
|
||||
Prelude
|
||||
@ -5811,27 +5812,8 @@ Variant Module
|
||||
<b>strict bytestring</b> Data.ByteString
|
||||
<b>lazy bytestring</b> Data.ByteString.Lazy
|
||||
|
||||
Escaping Text
|
||||
--------------
|
||||
|
||||
Haskell uses C-style single-character escape codes
|
||||
|
||||
Escape Unicode Character
|
||||
------ ------- ----------------------
|
||||
\\n U+000A newline
|
||||
\\0 U+0000 null character
|
||||
\\& n/a empty string
|
||||
\\' U+0027 single quote
|
||||
\\\\ U+005C backslash
|
||||
\\a U+0007 alert
|
||||
\\b U+0008 backspace
|
||||
\\f U+000C form feed
|
||||
\\r U+000D carriage return
|
||||
\\t U+0009 horizontal tab
|
||||
\\v U+000B vertical tab
|
||||
\\" U+0022 double quote
|
||||
|
||||
#### Conversions
|
||||
String Conversions
|
||||
------------------
|
||||
|
||||
Conversions between strings types ( from : left column, to : top row ) are done
|
||||
with several functions across the bytestring and text libraries. The mapping
|
||||
@ -6018,6 +6000,27 @@ to write well-typed regex expressions as strings.
|
||||
~~~~ {.haskell include="src/07-text-bytestring/regex.hs"}
|
||||
~~~~
|
||||
|
||||
Escaping Text
|
||||
--------------
|
||||
|
||||
Haskell uses C-style single-character escape codes
|
||||
|
||||
Escape Unicode Character
|
||||
------ ------- ----------------------
|
||||
\\n U+000A newline
|
||||
\\0 U+0000 null character
|
||||
\\& n/a empty string
|
||||
\\' U+0027 single quote
|
||||
\\\\ U+005C backslash
|
||||
\\a U+0007 alert
|
||||
\\b U+0008 backspace
|
||||
\\f U+000C form feed
|
||||
\\r U+000D carriage return
|
||||
\\t U+0009 horizontal tab
|
||||
\\v U+000B vertical tab
|
||||
\\" U+0022 double quote
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
Applicatives
|
||||
@ -6424,7 +6427,7 @@ See:
|
||||
|
||||
* [Control.Monad.Except](https://hackage.haskell.org/package/mtl-2.2.1/docs/Control-Monad-Except.html)
|
||||
|
||||
spoon
|
||||
Spoon
|
||||
-----
|
||||
|
||||
Sometimes you'll be forced to deal with seemingly pure functions that can throw
|
||||
@ -6445,12 +6448,13 @@ See:
|
||||
|
||||
* [Spoon](https://hackage.haskell.org/package/spoon)
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
Advanced Monads
|
||||
===============
|
||||
|
||||
TODO
|
||||
|
||||
Function Monad
|
||||
--------------
|
||||
|
||||
@ -7543,7 +7547,7 @@ scoping dictionary.
|
||||
~~~~ {.haskell include="src/14-interpreters/initial_interpreter.hs"}
|
||||
~~~~
|
||||
|
||||
What's especially nice about this approach is how naturally catamorphisms
|
||||
What is especially elegant about this approach is how naturally catamorphisms
|
||||
compose into efficient composite transformations.
|
||||
|
||||
```haskell
|
||||
@ -7949,7 +7953,7 @@ Unit tests
|
||||
11 tests completed
|
||||
```
|
||||
|
||||
silently
|
||||
Silently
|
||||
--------
|
||||
|
||||
Often in the process of testing IO heavy code we'll need to redirect stdout to
|
||||
@ -9975,8 +9979,6 @@ iterateN :: Int -> (a -> a) -> a -> Vector a
|
||||
~~~~ {.haskell include="src/20-data-structures/vector.hs"}
|
||||
~~~~
|
||||
|
||||
See: [Numerical Haskell: A Vector Tutorial](http://wiki.haskell.org/Numeric_Haskell:_A_Vector_Tutorial)
|
||||
|
||||
Mutable Vectors
|
||||
---------------
|
||||
|
||||
@ -10594,8 +10596,6 @@ pure and can always be rolled back if a commit fails.
|
||||
~~~~ {.haskell include="src/22-concurrency/stm.hs"}
|
||||
~~~~
|
||||
|
||||
See: [Beautiful Concurrency](https://www.fpcomplete.com/school/advanced-haskell/beautiful-concurrency)
|
||||
|
||||
Monad Par
|
||||
---------
|
||||
|
||||
@ -10806,8 +10806,6 @@ network protocol:
|
||||
~~~~ {.haskell include="src/24-parsing/attoparsec.hs"}
|
||||
~~~~
|
||||
|
||||
See: [Text Parsing Tutorial](https://www.fpcomplete.com/school/starting-with-haskell/libraries-and-frameworks/text-manipulation/attoparsec)
|
||||
|
||||
Configurator
|
||||
------------
|
||||
|
||||
@ -11074,8 +11072,6 @@ operator (``=$``) for combining Sources and Sink and a Conduit and a Sink respec
|
||||
~~~~ {.haskell include="src/25-streaming/conduit.hs"}
|
||||
~~~~
|
||||
|
||||
See: [Conduit Overview](https://www.fpcomplete.com/user/snoyberg/library-documentation/conduit-overview)
|
||||
|
||||
</hr>
|
||||
|
||||
Cryptography
|
||||
@ -13280,11 +13276,6 @@ or ST.
|
||||
~~~~ {.haskell include="src/29-ghc/monad_prim.hs"}
|
||||
~~~~
|
||||
|
||||
See:
|
||||
|
||||
* [Evaluation order and state tokens](https://www.fpcomplete.com/user/snoyberg/general-haskell/advanced/evaluation-order-and-state-tokens)
|
||||
|
||||
|
||||
ghc-heap-view
|
||||
-------------
|
||||
|
||||
@ -14114,6 +14105,8 @@ primop IntSubOp "-#" Dyadic Int# -> Int# -> Int#
|
||||
Runtime System
|
||||
---------------
|
||||
|
||||
TODO
|
||||
|
||||
The GHC runtime system is a massive part of the compiler. It comes in at around
|
||||
70,000 lines of C and Cmm. There is simply no way to explain most of what occurs
|
||||
in the runtime succinctly. There is more than two decades worth of work that has
|
||||
@ -15662,11 +15655,6 @@ Commutative Diagrams
|
||||
|
||||
TODO
|
||||
|
||||
String Diagrams
|
||||
---------------
|
||||
|
||||
TODO
|
||||
|
||||
Kleisli Category
|
||||
----------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user