Is there a way to do a C-style forward declaration in OCaml?
My problem is that I have two variants which mutually refer to each other:
type path_formula =
[ `Next of state_formula
| `Until of (state_formula * state_formula)
| `UntilB of (state_formula * int * state_formula)
]
type state_formula =
[ `True | `False
| `Not of state_formula
| `And of (state_formula * state_formula)
| `Or of (state_formula * state_formula)
| `Imply of (state_formula * state_formula)
| `Label of string
| `Prob` of (boundf * path_formula)
| `Expc` of (boundi * formula)
]
So both type must know the other one.. I searched for it on Google but unfortunately OCaml is not a so wide-use programming language..