File: check.ml

package info (click to toggle)
json-static 0.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 264 kB
  • ctags: 32
  • sloc: makefile: 82; ml: 65
file content (35 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(*
Initialization commands to type in the ocaml toplevel:

#use "topfind";;
#camlp4o;;
#require "json-wheel";;
#load "pa_json_static.cmo";;

*)


(**************** Miscellaneous tests (should compile fine) ************)

type coord = { x : int; 
	       y : int;
	       z : int }

type json variant = 
    A 
  | B of coord 
  | C of float * variant 
  | D of (bool * int option)

and coord = predefined { 
  x : int;
  y : int;
  z : int
}


type json a = b list
and b = int

type json c = (string * d * d) list
and d = [ `A ]