We are very happy to announce the release 0.2.0 of
Gospel is a tool-agnostic behavioural specification language for OCaml. It allows you to write strongly typed contract-based specifications for your OCaml libraries (for a reasonable subset of OCaml). Gospel’s syntax has been designed to be easy to learn for an OCaml programmer. You can access the documentation here.
This release adds two main features, a
gospel dumpast command and a
gospel.ppx ppx rewriter to display Gospel specification as documentation with
Some minor extensions have been added to the language itself:
withconstruct to name a variable in type invariants referring to a
value of the specified type,
- anonymous functions now support both patterns in arguments and return type
- unit result in function headers,
- constants can now be referenced in specifications,
- infix operators are now accepted in specification headers.
Parser, preprocessor, and error messages have been improved. In particular the preprocessor can now handle large files and locations are properly tracked. Pattern matches are now also checked for exhaustiveness and redundancy.
We have made a number of improvements and bugfixes in the type checker as well as some minor modifications in the Gospel standard library. Finally, the documentation has been revised.