Skip to content

Commit 8611844

Browse files
fixup! middle-1/haskell: fix some questions, add new ones
1 parent 5912347 commit 8611844

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

backend/middle-1/haskell.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,21 +128,21 @@ How can we bundle Pattern Synonyms with datatypes in export and import lists?
128128
## Laziness
129129

130130
* Describe the process of evaluating a thunk and storing the evaluated value.
131-
* After a thunk is fully evaluated, will the GHC runtime evaluate it again?
131+
* After a thunk is fully evaluated, can the GHC runtime evaluate it again?
132132
* What is a black hole and what problem does it solve?
133-
* What kind of thunks are black holes used for?
134-
* Enumerate cases where a thunk returning an ADT will be evaluated.
133+
* For what kind of thunks are black holes used?
134+
* Enumerate cases where a thunk returning an ADT is evaluated.
135135
* What is an irrefutable pattern and how does it work?
136136
* Where are patterns in Haskell irrefutable by default?
137137
* Which patterns are irrefutable:
138138
1. `f (Just a) = ...`
139139
1. `let (Just a) = ...`
140140
1. `where (Just a) = ...`
141-
1. `g (MyType a) = ...` where `MyType` is a `newtype` declaration.
142-
1. `g (MyType a) = ...` where `MyType` is a `data` declaration.
141+
1. `g (N a) = ...` where `newtype N a = N a`.
142+
1. `g (D a) = ...` where `data D a = D a`.
143143
1. `f a = ...`
144144
1. `f _ = ...`
145-
* When can irrefutable patterns be helpful? Hint: you may describe why
145+
* When can irrefutable patterns be useful? Hint: you may describe why
146146
[`Data.List.partition`](https://hackage.haskell.org/package/base-4.16.0.0/docs/src/Data.OldList.html#partition)
147147
uses them.
148148
* What does the `sprint` command do in `ghci`?

0 commit comments

Comments
 (0)