haskellliquid-haskell

Is it possible to use one line contracts in Liquid Haskell?


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 ?


Solution

  • 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.