On Mon, Jun 1, 2015 at 10:58 AM, Matt Oliveri <atma...@gmail.com> wrote:

> But anyway, I don't think OCaml allows arbitrary forward references,
> or has forward declarations. The syntax for mutually recursive types
> is:
> type foo =
>   ...
> and bar =
>   ...
>
> With this syntax, foo can refer to bar.

I know at the top you say mutually recursive, but
wrt the last line, foo and bar can both refer to each other..
Assume it's the same for ocaml as the following sml...

datatype foo = A of bar
     and bar = B of foo option
val x = A(B(SOME(A(B(NONE)))))
_______________________________________________
bitc-dev mailing list
bitc-dev@coyotos.org
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to