Skip to content
This repository
Newer
Older
100644 70 lines (59 sloc) 2.623 kb
fccc6851 » MLstate
2011-06-21 Initial open-source release
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 open SurfaceAst
19
20 module Pattern :
21 sig
22 include TraverseInterface.TRAVERSE
23 with type 'a t = 'b pat constraint 'a = 'b * _ * _
24 and type 'a container = 'b pat constraint 'a = 'b * _ * _
25 val get_vars : ?acc:'a list -> 'a pat -> 'a list
26 val appears_str : string -> string pat -> bool
27 val appears : Ident.t -> Ident.t pat -> bool
28 end
29
30 module Type :
31 sig
32 include TraverseInterface.TRAVERSE
33 with type 'a t = 'b ty constraint 'a = 'b * _ * _
34 and type 'a container = 'b ty constraint 'a = 'b * _ * _
35 val get_typenames : 'a ty -> 'a list
36 val get_typenames_with_acc : 'a list -> 'a ty -> 'a list
37 val get_typenames_from_arrow_type : 'a arrow_t -> 'a list
38 end
39
40 module Expr :
41 sig
42 include TraverseInterface.TRAVERSE
43 with type 'a t = ('b,'c) expr constraint 'a = 'b * 'c * _
44 and type 'a container = ('b,'c) expr constraint 'a = 'b * 'c * _
45 val appears_str : string -> (string,_) expr -> bool
46 val appears : Ident.t -> (Ident.t,_) expr -> bool
47 val used_vars_str : string list -> (string, _) expr -> string list
48 val used_vars : Ident.t list -> (Ident.t, _) expr -> Ident.t list
49 end
50
51 module CodeElt : TraverseInterface.TRAVERSE
52 with type 'a t = ('b,'c) expr constraint 'a = 'b * 'c * _
53 and type 'a container = ('b,'c) code_elt constraint 'a = 'b * 'c * _
54
55 module Code :
56 sig
57 include TraverseInterface.TRAVERSE
58 with type 'a t = ('b,'c) expr constraint 'a = 'b * 'c * _
59 and type 'a container = ('b,'c) code constraint 'a = 'b * 'c * _
60 val size : (_,_) code -> int
61 val length : (_,_) code -> int
62 end
63
64 module CodeEltTopPattern : TraverseInterface.TRAVERSE
65 with type 'a t = 'b pat constraint 'a = 'b * _ * _
66 and type 'a container = ('b,'c) code_elt constraint 'a = 'b * 'c * _
67
68 module CodeTopPattern : TraverseInterface.TRAVERSE
69 with type 'a t = 'b pat constraint 'a = 'b * _ * _
70 and type 'a container = ('b,'c) code constraint 'a = 'b * 'c * _
Something went wrong with that request. Please try again.