Skip to content

Commit da96f82

Browse files
committed
update
1 parent a507847 commit da96f82

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Tutorial_04_Polymorphism.lhs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ absoluteSum = undefined
303303
\newthought{Inference}
304304
LiquidHaskell verifies `vectorSum` -- or, to be precise,
305305
the safety of the vector accesses `vec ! i`.
306-
**Note** you need to run `liquid` with the option `--no-termination` or make
307-
sure your source file has `{-@ LIQUID "--no-termination" @-}.
308306
The verification works out because LiquidHaskell is able to
309307
*automatically infer* ^[In your editor, click on `go` to see the inferred type.]
310308
@@ -317,6 +315,12 @@ between `0` and the length of `vec` (inclusive). LiquidHaskell
317315
uses this and the test that `i < sz` to establish that `i` is
318316
between `0` and `(vlen vec)` to prove safety.
319317
318+
**Note** you need to run `liquid` with the option `--no-termination`
319+
or make sure your source file has `{-@ LIQUID "--no-termination" @-},
320+
otherwise the code for `go` fails the now default termination check.
321+
We will come back to this example later to see how to verify termination
322+
using metrics.
323+
320324
<div class="hwex" id="Off by one?">
321325
Why does the type of `go` have `v <= sz` and not `v < sz` ?
322326
</div>

0 commit comments

Comments
 (0)