Created
December 16, 2012 06:58
-
-
Save alavrik/4303915 to your computer and use it in GitHub Desktop.
Piqi definitions of OCaml's `type example = ConsOne of int array | ConsTwo of float array` `t_piqi.ml` generated from `t.piqi` by running `piqic ocaml --pp t.piqi`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.variant [ | |
.name example | |
.option [ | |
.name ConsOne | |
.type int-array | |
.ocaml-name "ConsOne" | |
] | |
.option [ | |
.name ConsTwo | |
.type float-array | |
.ocaml-name "ConsTwo" | |
] | |
] | |
.list [ | |
.name float-array | |
.type float | |
.ocaml-array | |
] | |
.list [ | |
.name int-array | |
.type int | |
.ocaml-array | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module rec T_piqi : | |
sig | |
type float64 = float | |
type float = T_piqi.float64 | |
type example = | |
[ | |
| `ConsOne of T_piqi.int_array | |
| `ConsTwo of T_piqi.float_array | |
] | |
type float_array = T_piqi.float array | |
type int_array = int array | |
end = T_piqi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment