(* * The first line of this file are intentionally left blank. * Please scroll down. *) (* type x = private [> `A ];; no variant types yet *) (* type x = private [< `A ];; no variant types yet *) type x = private < x : int; .. >;; let a :> int = 1;; (* 37 *) object (self : 'Self) inherit a val mutable a = 47 val b = 4 method m3 x = 48 end;; class z = object (* 44 *) val a12345678 : a :> b = 1 val b12345678 :> c = 2 end type 'a g = (int,int) # a as 'a;; type 'a f = int # a as 'a;; type e = < m1 : 'a . a; m2 : int; .. >;; type d = < .. >;; type c = < >;; type b = < m1 : 'a . a; m2 : int >;; type a = #b;; {< a = 1; b = 2; c = 3 >};; a <- 5;; (x :> v);; (x : a :> b);; x#f;; new A.B.a;; module type A = sig class virtual a : t -> int * int -> [a,b] A.b and ['a, 'b] b : object val a : int end end module type T = sig (* line 34 *) class type virtual a = A.a and b = object val a : int end end class type virtual ['a, 'b] a = ['a * 'b] A.B.c and b = C.D.e and c = object ('Self) inherit a val mutable a : float val b : int method virtual a : int method private virtual b : int method private m1 : 'a . 'a -> 'a method m3 : 'a . 'a constraint a = b end and d = object end class f = object inherit A.c 4 as a inherit b inherit a455667 as b val mutable a = 5 val b : int = 6 val a878787 : 'a = 7 end class e = let rec z = 5 and y = 6 in A.B.f (6,7) class g = let z = 0 and y = 6 in ([t * q, r] h : A.B.i) class a = fun a013489 b -> object end class a94837 a b = object end class virtual c (c, d) e = object (self) end and d = fun k l -> fun m -> object end and [-'a, +'b] a = object (self : Self) constraint a = b initializer 57 method virtual a : int method private virtual b : int method private m1 : 'a . 'a -> 'a = fun a -> a method private m2 a b : t = (a,b) method m3 : 'a . 'a = a method m4 (a,b) : t = a end let module Z = struct end in let module Y = struct end in 5;; module rec R1 : RT1 = struct type r1 = R1 of R2.r2 end and R2 : RT2 = struct type r2 = R2 of R1.r1 end;; module type B = sig module rec R1 : RT1 and R2 : RT2 end;; include A;; module type A = sig end with type t = int and module A = B.C;; module type S2 = sig exception A of int * int external ( *** ) : int -> int = "a" "b";; external a : int -> int = "a" "b";; include A module type B module type C = G(A).H open C.D open C.D.E type a = f = private A of a * b * c | B;; type +'a b constraint 'a = int and ('c, -'d) e = private {a : int; b : 'c};; val x : unit -> unit -> unit val (+++) : int -> int -> int module M5 : sig module A(B : C) : D end end module type S3 = functor(X : S4) -> sig val (++) : int -> int -> float end;; module M4 = (A : S);; module M1 = A.B.C;; module M2 = F (A.G B.C.K H);; module M3 = struct type t let f a b = 2;; 3;; module M4 = F (struct let a = 27 end) end;; function | (++++) | { a = (); b = (z : int) } | [| |] | [| 1;2;3 |] | [1;2;3] | True | False -> False | true | false -> True | A.B.c | 0::1::2::3::4::[] | 0::1::[] -> () | 0,1 | 2,'a'..'f',8 | (_ as x) | a | -5 | 5 | 6l | 7L | 8n | "abc" | 7.4E+2 | 'l' | A(a,b) | Some(a,b) -> b;; a.[2] <- 5;; a.(2) <- 5;; external ( *** ) : int -> int = "a" "b";; external a : int -> int = "a" "b";; exception A of int * int = U.A;; exception A of int * int;; open U.V.C;; type a = { a : 'a 'b . c; d : 'a 'b 'c . t };; type a = U.a;; type e = a -> a * b * c -> ('c, _, 'e) tyconstr * ('a, 'b) tree as 'a;; type e = {a : int};; type a = f = A of a * b * c | B;; type a = f = private A of a * b * c | B;; type e = f = {a : int};; type e = f = private {a : int};; type a = A of a * b * c | B | C of (a * b);; type a = private | A of a * b * c | B | C of (a * b);; type +'a b constraint 'a = int and ('c, -'d) e = private {a : int; b : 'c} let rec a = 1 and c d e = 2 in 3 let a = 1 and b = 2;; a.v <- 0;; a := 3;; a.{1} <- 2;; a.{1,2} <- 3;; a.{1,2,3} <- 4;; a.{1,2,3,4} <- 5;; for a = 2 downto 0 do 1; while a do 1;2;3 done done;; for a = 2 to 3 do 4; 5 done;; function | a when 3 = 4 -> 2 | _ -> if true then 3 | c -> match c with | d -> try if 3 then 4 else 5 with | x -> x;; let z = let a b : int = 2 in 3 let z = let a = 2 in let rec b = 3 and c d e = 4 in 4;; (( 0; 1;) ; 2; 3);; 0 || 1 or 2 & 3 && 4 < 5 > 6 <= 7 >= 8 = 9 <> 10 == 11 != 12 ^ 14 @ 15 ^@ (15 === 16);; 0 :: 1 :: [2;3];; 0 +.+. 1 +. 2 + 3 - 4;; 9 %%%% 0 % 1 *. 2 / 3 * 4 land 5 lor 6 lxor 7 mod 8;; -5, (- -5), -6l, (- - -7L), -8n, (- -7.0);; Some(Some(1,2,3), f a);; assert(lazy assert false);; a.{1};; a.{1,2};; a.{1,2,3};; a.{1,2,3,4};; 2,3,4;; 2,3;; ~-. ~- ! !