You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mkDocs/docs/options.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -739,6 +739,21 @@ an import of a module coming from package `PACKAGE`. e.g.
739
739
740
740
LiquidHaskell can be configured to emit warnings whenever it encounters incomplete terms, known as *holes*.
741
741
742
+
To create a hole you need to have a binding with the name `hole`in the scope by adding:
743
+
744
+
hole =undefined
745
+
746
+
To use a hole you simply insert the `hole`inany place
747
+
where you want to get more type information.For example:
748
+
```haskell
749
+
hole =undefined
750
+
751
+
{-@ listLength :: xs:[a] -> {v : Nat | v == len xs} @-}
752
+
listLength:: [a] ->Int
753
+
listLength []= hole -- Hole inserted here
754
+
listLength (_:xs) =1+ listLength xs
755
+
```
756
+
742
757
This flag is particularly useful during development, ensuring that any placeholders in your specifications are reviewed and completed before final evaluation.
743
758
744
759
To activate this behavior, use the `--warn-on-term-holes` flag either:
0 commit comments