When I retrieve the following Coq data types in OCaml:
Inductive Foo := | A | B.
Inductive Bar (f:Foo) := | C | D.
Extraction Language Ocaml.
Extraction "test.ml" Foo Bar.
I get the following ML code:
type foo =
| A
| B
type bar =
| C
| D
The type "bar" is different from Coq because it has an "f" as part of its type signature.
What is the best way to define types so that they are well retrievable for OCaml?
source
share