1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. *)
9 (* *)
10 (* All rights reserved. This file is distributed under the terms of *)
11 (* the GNU Lesser General Public License version 2.1, with the *)
12 (* special exception on linking described in the file LICENSE. *)
13 (* *)
14 (**************************************************************************)
15
16 (* Compilation of pattern-matching *)
17
18 open Typedtree
19 open Lambda
20
21
22 (* Entry points to match compiler *)
23 val for_function:
24 Location.t -> int ref option -> lambda -> (pattern * lambda) list ->
25 partial -> lambda
26 val for_trywith:
27 lambda -> (pattern * lambda) list -> lambda
28 val for_let:
29 Location.t -> lambda -> pattern -> lambda -> lambda
30 val for_multiple_match:
31 Location.t -> lambda list -> (pattern * lambda) list -> partial ->
32 lambda
33
34 val for_tupled_function:
35 Location.t -> Ident.t list -> (pattern list * lambda) list ->
36 partial -> lambda
37
38 exception Cannot_flatten
39
40 val flatten_pattern: int -> pattern -> pattern list
41
42 (* Expand stringswitch to string test tree *)
43 val expand_stringswitch:
44 Location.t -> lambda -> (string * lambda) list -> lambda option -> lambda
45
46 val inline_lazy_force : lambda -> Location.t -> lambda
47