Skip to content

Commit 6a5b347

Browse files
authored
Syntax corrections for fast iteration post (#41)
1 parent 7a40c8a commit 6a5b347

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • content/quick-tips-for-fast-iteration-in-haskell

content/quick-tips-for-fast-iteration-in-haskell/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ Take a look at the [GHC 9.14.1 user guide's section on runtime control](https://
198198
Thus, we update our `cabal.fast.project` project file to pass the appropriate flag to GHC. We'll use an allocation area of 64MB, but do experiment on your own workloads:
199199

200200
```
201-
import cabal.project
201+
import: cabal.project
202202
203203
-- Step 1: tuning GHC
204-
program-options:
204+
program-options
205205
ghc-options: +RTS -A64m -RTS
206206
```
207207

@@ -214,14 +214,14 @@ Even if GHC is given the appropriate resources to do its job more effectively, i
214214
But this is merely the _default_ behavior, and this article is all about speed. Instead, we can disable optimizations via the `optimization` option in cabal project files:
215215

216216
```
217-
import cabal.project
217+
import: cabal.project
218218
219219
-- Step 1: tuning GHC
220-
program-options:
220+
program-options
221221
ghc-options: +RTS -A64m -RTS
222222
223223
-- Step 2: disable optimizations
224-
optimization: false
224+
optimization: False
225225
```
226226

227227
Note that this optimization flag only applies to your locally-built packages. Your third-party dependencies will be compiled using the default optimization level, `-O1`. This is generally considered acceptable since your third-party dependencies are rarely built, and it allows you to re-use them for other build profiles.
@@ -240,11 +240,11 @@ In our experience, a number from 4 - 8 is appropriate to start with. We therefor
240240
import cabal.project
241241
242242
-- Step 1: tuning GHC
243-
program-options:
243+
program-options
244244
ghc-options: +RTS -A64m -RTS
245245
246246
-- Step 2: disable optimizations
247-
optimization: false
247+
optimization: False
248248
249249
-- Step 3: build parallelism
250250
jobs: 6
@@ -256,14 +256,14 @@ We update our `cabal.fast.project` one final time:
256256

257257

258258
```
259-
import cabal.project
259+
import: cabal.project
260260
261261
-- Step 1: tuning GHC
262-
program-options:
262+
program-options
263263
ghc-options: +RTS -A64m -RTS
264264
265265
-- Step 2: disable optimizations
266-
optimization: false
266+
optimization: False
267267
268268
-- Step 3: build parallelism
269269
jobs: 6

0 commit comments

Comments
 (0)