mirage / functoria

A DSL to invoke otherworldly functors
ISC License
63 stars 21 forks source link

Fix warnings on OCaml 4.12 #196

Closed kit-ty-kate closed 2 years ago

kit-ty-kate commented 3 years ago

https://github.com/ocaml/ocaml/pull/9811 introduced a new warning to the compiler which is triggered by functoria:

File "runtime/functoria_runtime.ml", lines 36-39, characters 35-24:
36 | ...................................match t.kind with
37 |     | Opt (d,_) -> Some d
38 |     | Flag -> Some false
39 |     | Required _ -> None
Warning 18 [not-principal]: 
  The return type of this pattern-matching is ambiguous.
  Please add a type annotation, as the choice of `a option' is not principal.
samoht commented 2 years ago

Thansk!