-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathast_utils.mli
66 lines (53 loc) · 1.31 KB
/
ast_utils.mli
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(** Useful functions on ASTs. *)
module Encode : sig
open Ast
module Typ : sig
open Typ
val typ: Raw.typ -> typ
val kind: Raw.typ Raw.kind -> typ kind
end
module Term : sig
open Ast.Term
val term: (Raw.typ Raw.kind, Raw.typ) Raw.term -> term
end
module Prog : sig
open Ast.Prog
val prog: Raw.prog -> t
end
end
module Decode : sig
open Ast
module Typ : sig
open Raw
val typ: Typ.t -> typ
val kind: Kind.t -> typ kind
end
end
module PPrint : sig
open Ast.Raw
type doc = Pprint.document
val typ: typ -> doc
val kind: typ kind -> doc
module Typ : sig
module Raw : sig
val channel: Pprint.Channel.channel -> typ -> unit
val buffer: Pprint.Buffer.channel -> typ -> unit
val string: typ -> string
end
open Ast
val channel: Pprint.Channel.channel -> Typ.t -> unit
val buffer: Pprint.Buffer.channel -> Typ.t -> unit
val string: Typ.t -> string
end
module Kind : sig
module Raw : sig
val channel: Pprint.Channel.channel -> typ kind -> unit
val buffer: Pprint.Buffer.channel -> typ kind -> unit
val string: typ kind -> string
end
open Ast
val channel: Pprint.Channel.channel -> Kind.t -> unit
val buffer: Pprint.Buffer.channel -> Kind.t -> unit
val string: Kind.t -> string
end
end