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/configuration.md
+3
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,9 @@ Plugins have a generic config to control their behaviour. The schema of such con
63
63
-`haskell.plugin.tactics.config.hole_severity`, default empty: The severity to use when showing hole diagnostics. These are noisy, but some editors don't allow jumping to all severities. One of `error`, `warning`, `info`, `hint`, `none`.
64
64
-`haskell.plugin.tactics.config.max_use_ctor_actions`, default 5: Maximum number of `Use constructor <x>` code actions that can appear.
65
65
-`haskell.plugin.tactics.config.proofstate_styling`, default true: Should Wingman emit styling markup when showing metaprogram proof states?
66
+
-`eval`:
67
+
-`haskell.plugin.eval.config.diff`, default true: When reloading haddock test results in changes, mark it with WAS/NOW.
68
+
-`haskell.plugin.eval.config.exception`, default false: When the command results in an exception, mark it with `*** Exception:`.
66
69
-`ghcide-completions`:
67
70
-`haskell.plugin.ghcide-completions.config.snippetsOn`, default true: Inserts snippets when using code completions.
68
71
-`haskell.plugin.ghcide-completions.config.autoExtendOn`, default true: Extends the import list automatically when completing a out-of-scope identifier.
Copy file name to clipboardExpand all lines: plugins/hls-eval-plugin/README.md
+25
Original file line number
Diff line number
Diff line change
@@ -242,6 +242,11 @@ On the contrary, if the test were into a plain comment, the result would simply
242
242
-}
243
243
```
244
244
245
+
If you find this WAS/NOW behaviour does not fit your needs, you can turn it off with toggling the configuration option:
246
+
```json
247
+
"haskell.plugin.eval.config.diff": false
248
+
```
249
+
245
250
# Multiline Output
246
251
247
252
By default, the output of every expression is returned as a single line.
@@ -274,6 +279,8 @@ To display it properly, we can exploit the fact that the output of an error is d
274
279
]
275
280
```
276
281
282
+
This assumes you did not turn on exception marking (see [Marking exceptions](#marking-exceptions) below).
283
+
277
284
# Differences with doctest
278
285
279
286
Though the Eval plugin functionality is quite similar to that of [doctest](https://hackage.haskell.org/package/doctest), some doctest's features are not supported.
@@ -287,6 +294,24 @@ Only the value of an IO expression is spliced in, not its output:
287
294
()
288
295
```
289
296
297
+
### Marking exceptions
298
+
299
+
When an exception is thrown it is not prefixed:
300
+
301
+
```
302
+
>>> 1 `div` 0
303
+
divide by zero
304
+
```
305
+
306
+
If you want to get the doctest/GHCi behaviour, you can toggle the configuration option:
307
+
```json
308
+
"haskell.plugin.eval.config.exception": true
309
+
```
310
+
```
311
+
>>> 1 `div` 0
312
+
*** Exception: divide by zero
313
+
```
314
+
290
315
### Pattern Matching
291
316
292
317
The arbitrary content matcher __...__ is unsupported.
0 commit comments