Liquid Haskell uses comments like {-@ ... @-}
for contracts block. Is it possible (with command line option, config file) to specify to use one line comments style like -- ...
for contracts ?
Asked
Active
Viewed 79 times
3
-
2Those are not comments, but "contracts" that you put in between the `{-@ ... @-}`. Yes you can use `--` for *comments*. – Willem Van Onsem May 23 '19 at 13:57
-
OK, correct terminology is "contract". I tried to use `--` for contracts, but LH ignores them, so, is it possible to use it for _contracts_? – RandomB May 23 '19 at 14:05
-
as far as I know, it is not, `--` will ignore what is put in the rest of that line. – Willem Van Onsem May 23 '19 at 14:08
2 Answers
3
No. Looking at the source code for Liquid Haskell (in the file src/Language/Haskell/Liquid/GHC/Interface.hs
), extraction of specifications is performed by the function extractSpecComment
. This searches for comments of type AnnBlockComment
(which are comments in the {-...-}
style) for those with an initial {-@
and terminating @-}
. No other comment style is supported.

K. A. Buhr
- 45,621
- 3
- 45
- 71
1
No the only way to comment is putting yout comment :
{% comment %} Like this. {% endcomment %}

Δημήτρης Καπουράνης
- 19
- 4