Skip to content

Commit a1a9d99

Browse files
committed
Fix typos and issues
1 parent 124255a commit a1a9d99

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

tutorials/01_fp-env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Haskell does not require a specific editor or IDE. You can use any editor you ar
114114

115115
Common choices include:
116116

117-
* **Vim** with [Haskell plugins](https://wiki.haskell.org/Vim) for command-line enthusiasts
117+
* **Vim** with [Haskell plugins](https://wiki.haskell.org/Vim) for command-line enthusiasts
118118
* **Visual Studio Code** with [Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) for a modern and user-friendly experience
119119
* **IntelliJ IDEA** with [Haskell LSP](https://plugins.jetbrains.com/plugin/24123-haskell-lsp) for those who prefer JetBrains IDEs
120120
* **Emacs** with [Haskell mods](https://wiki.haskell.org/Emacs) for Emacs lovers

tutorials/02_functions-types.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ In this tutorial, we build on that foundation and make the picture more concrete
1111

1212
* how functions are written and typed,
1313
* how Haskell represents data, and
14-
* how syntax reflects the underlying functional and mathematical model.
14+
* how syntax reflects the underlying functional and mathematical model.
1515

1616
Before diving into functions and data types themselves, it is useful to clarify some basic syntactic rules and naming conventions that appear throughout Haskell code. This part is not meant to be memorized — it is a reference that will become familiar as we encounter these constructs in practice.
1717

@@ -144,7 +144,7 @@ z = (x + 7) :: Integer
144144
Haskell uses static typing:
145145

146146
* every expression has exactly one type,
147-
* the type is determined at compile time, and
147+
* the type is determined at compile time, and
148148
* it cannot change during execution.
149149

150150
Because of **type inference**, type signatures are not always required, but they are **strongly recommended for clarity and documentation**.
@@ -324,7 +324,7 @@ Haskell provides a small set of basic data types that are used throughout the st
324324
* `Double` = double-precision floating point
325325
* `Word` = unsigned integer
326326
* `Char` = Unicode character
327-
* `Bool` = logical value (`True¨ or `False`)
327+
* `Bool` = logical value (`True` or `False`)
328328
* `String` = type synonym for `[Char]` (list of characters)
329329

330330
You have already encountered most of these in GHCi examples. More specialized data structures (maps, sets, sequences, text) live in libraries and will be introduced when needed.
@@ -393,7 +393,7 @@ data Pet = Pet
393393

394394
There are several ways to address this:
395395

396-
* use more specific field names (personName, petName),
396+
* use more specific field names (`personName`, `petName`),
397397
* use modules to separate namespaces,
398398
* or enable language extensions such as `DuplicateRecordFields`.
399399

@@ -521,7 +521,7 @@ addFirstTwo (x, y, _) = x + y
521521

522522
#### Tuples as product types
523523

524-
Conceptually, tuples are **product types*. A tuple `(a, b)` contains both an `a` and a `b`.
524+
Conceptually, tuples are **product types**. A tuple `(a, b)` contains both an `a` and a `b`.
525525

526526
You can model tuples explicitly using `data`:
527527

tutorials/04_containers-functions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ You can think of it as a *better list* in situations where you need:
203203

204204
Compared to lists:
205205

206-
* lists are optimized for prepending (x : xs)
207-
* sequences are optimized for both ends (<| and |>)
206+
* lists are optimized for prepending (`x : xs`)
207+
* sequences are optimized for both ends (`<|` and `|>`)
208208

209209
```
210210
ghci> import Data.Sequence
@@ -544,6 +544,9 @@ This is not metaphorical. It is literally mathematical **function composition**
544544

545545
```math
546546
f: A \to B
547+
```
548+
549+
```math
547550
g: B \to C
548551
```
549552

tutorials/05_typeclasses.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ This defines structural equality. Minimal requirement for custom instances: defi
204204

205205
**Laws** (that are expected but not enforced by the compiler), for all `x`, `y`, `z`:
206206

207-
* Reflexivity: `x == x`
208-
* Symmetry: `x == y ⇒ y == x`
209-
* Transitivity: `(x == y && y == z) ⇒ x == z`
207+
* Reflexivity: `x == x`
208+
* Symmetry: `x == y ⇒ y == x`
209+
* Transitivity: `(x == y && y == z) ⇒ x == z`
210210

211211
Example of custom instance:
212212

@@ -447,7 +447,7 @@ A typeclass defines:
447447

448448
* a **set of types**
449449
* that provide certain **operations**
450-
* and obey certain *laws**
450+
* and obey certain **laws**
451451

452452
In mathematical language:
453453

0 commit comments

Comments
 (0)