Skip to content

Commit

Permalink
Stash compilation error
Browse files Browse the repository at this point in the history
I don't understand the following error yet, given that I bind the type
a by a type constraint on the field [t].

---
File "test/test__cache.ml", line 42, characters 27-53:
42 |   let (Provider.T (type a) { t = (_ : a); interface }) = num_printer in
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Existential types introduced in a constructor pattern
       must be bound by a type constraint on the argument.
  • Loading branch information
mbarbin committed Feb 19, 2024
1 parent ef44da3 commit 8e3f81a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test__cache.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let%expect_test "override" =
(* An empty interface has no cache. *)
show_cache (Provider.Interface.make []);
[%expect {| None |}];
let (Provider.T { t = _; interface }) = num_printer in
let (Provider.T (type a) { t = (_ : a); interface }) = num_printer in
let int_printer_lookup () =
(fun (type a) (interface : (a, _) Provider.Interface.t) ->
ignore
Expand Down

0 comments on commit 8e3f81a

Please sign in to comment.