For context I am an ocaml beginner working through Types and Programming Languages.
I want to write inline tests using %test_eq as shown in real world ocaml, for example:
type colour = Red | Blue [@@deriving sexp, compare]
let%test "colours" = [%test_eq: colour] Red Blue
but I get the error:
16 | let%test "colours" = [%test_eq: colour] Red Blue
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This expression has type unit but an expression was expected of type
bool