ocaml-gospel / gospel

A tool-agnostic formal specification language for OCaml.
https://ocaml-gospel.github.io/gospel
MIT License
123 stars 16 forks source link

Update record fails with irrelevant error #409

Open n-osborne opened 2 months ago

n-osborne commented 2 months ago
$ cat > update_record.mli << EOF
> (*@ type r = { a : bool; b : integer } *)
> 
> type t
> (*@ model r : r *)
> 
> val f : t -> t
> (*@ y = f x
>     ensures y.r = { x.r with b = 42 }
> *)
> EOF
$ gospel check update_record.mli
(* {gospel_expected|
   [125] File "update_record.mli", line 8, characters 20-23:
         8 |     ensures y.r = { x.r with b = 42 }
                                 ^^^
         Error: The record field a cannot be applied.
   |gospel_expected} *)