Skip to content

Commit 75ebe3f

Browse files
maueroatsMauer-Oatsmemowe
authored
remove extra word, regen html (learnyouahaskell#55)
Co-authored-by: Mauer-Oats <[email protected]> Co-authored-by: Mirko Westermeier <[email protected]>
1 parent eb226fb commit 75ebe3f

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

markdown/generated_html/input-and-output.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ <h2 id="exceptions">Exceptions</h2>
21692169
<p><img src="assets/images/input-and-output/police.png" class="left"
21702170
width="241" height="328"
21712171
alt="Stop right there, criminal scum! Nobody breaks the law on my watch! Now pay your fine or it’s off to jail." /></p>
2172-
<p>Pure code can throw exceptions, but it they can only be caught in the
2172+
<p>Pure code can throw exceptions, but they can only be caught in the
21732173
I/O part of our code (when we’re inside a <em>do</em> block that goes
21742174
into <code>main</code>). That’s because you don’t know when (or if)
21752175
anything will be evaluated in pure code, because it is lazy and doesn’t

markdown/generated_html/making-our-own-types-and-typeclasses.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,9 @@ <h2 id="type-synonyms">Type synonyms</h2>
782782
<code>Map Int String</code> or if we’re dealin’ with one of them
783783
polymorphic functions, <code>[a]</code> or
784784
<code>(Ord a) =&gt; Maybe a</code> and stuff. And like, sometimes me and
785-
my buddies say that <code>Maybe</code> is a type, but we don’t mean that,
786-
cause every idiot knows <code>Maybe</code> is a type constructor. When I
787-
apply an extra type to <code>Maybe</code>, like
785+
my buddies say that <code>Maybe</code> is a type, but we don’t mean
786+
that, cause every idiot knows <code>Maybe</code> is a type constructor.
787+
When I apply an extra type to <code>Maybe</code>, like
788788
<code>Maybe String</code>, then I have a concrete type. You know, values
789789
can only have types that are concrete types! So in conclusion, live
790790
fast, love hard and don’t let anybody else use your comb!</p>

markdown/generated_html/modules.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ <h2 id="data-map">Data.Map</h2>
984984
<p><code class="label function">fromListWith</code> is a cool little
985985
function. It acts like <code>fromList</code>, only it doesn’t discard
986986
duplicate keys but it uses a function supplied to it to decide what to
987-
do with them. Let’s say that a friend can have several numbers and we have
988-
an association list set up like this.</p>
987+
do with them. Let’s say that a friend can have several numbers and we
988+
have an association list set up like this.</p>
989989
<pre class="haskell:hs"><code>phoneBook =
990990
[(&quot;amelia&quot;,&quot;555-2938&quot;)
991991
,(&quot;amelia&quot;,&quot;342-2492&quot;)

markdown/source_md/input-and-output.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Input and Output
1+
# Input and Output
22

33
![poor dog](assets/images/input-and-output/dognap.png){.right width=261 height=382}
44

@@ -2067,7 +2067,7 @@ ghci> head []
20672067

20682068
![Stop right there, criminal scum! Nobody breaks the law on my watch! Now pay your fine or it's off to jail.](assets/images/input-and-output/police.png){width=241 height=328 .left}
20692069

2070-
Pure code can throw exceptions, but it they can only be caught in the I/O part of our code (when we're inside a *do* block that goes into `main`).
2070+
Pure code can throw exceptions, but they can only be caught in the I/O part of our code (when we're inside a *do* block that goes into `main`).
20712071
That's because you don't know when (or if) anything will be evaluated in pure code, because it is lazy and doesn't have a well-defined order of execution, whereas I/O code does.
20722072

20732073
Earlier, we talked about how we should spend as little time as possible in the I/O part of our program.
@@ -2307,4 +2307,3 @@ This is kind of similar to *try-catch* blocks of other languages, where you can
23072307
Now you know how to deal with I/O exceptions!
23082308
Throwing exceptions from pure code and dealing with them hasn't been covered here, mainly because, like we said, Haskell offers much better ways to indicate errors than reverting to I/O to catch them.
23092309
Even when glueing together I/O actions that might fail, I prefer to have their type be something like `IO (Either a b)`, meaning that they're normal I/O actions but the result that they yield when performed is of type `Either a b`, meaning it's either `Left a` or `Right b`.
2310-

0 commit comments

Comments
 (0)