Both of the following test-cases raise the partial-match (8) warning on both f and g when using trunk (a7e0173). This seems contrary to GADT's design and this doesn't happen in any of the previous version of OCaml.
type a
type b
type 'a test =
| Gen of int
| A : a -> a test
| B : b -> b test
let f = function
| Gen _ -> ()
| A _ -> ()
let g = function
| Gen _ -> ()
| B _ -> ()
type a
type b
type 'a test =
| A : a -> a test
| B : b -> b test
let f : a test -> unit = function
| A _ -> ()
let g : b test -> unit = function
| B _ -> ()
Is this expected? If so, what is the new construct for this kind of pattern?
Both of the following test-cases raise the
partial-match(8) warning on bothfandgwhen using trunk (a7e0173). This seems contrary to GADT's design and this doesn't happen in any of the previous version of OCaml.Is this expected? If so, what is the new construct for this kind of pattern?