1Ast_helper.Typ(3)                OCaml library               Ast_helper.Typ(3)
2
3
4

NAME

6       Ast_helper.Typ - Type expressions
7

Module

9       Module   Ast_helper.Typ
10

Documentation

12       Module Typ
13        : sig end
14
15
16       Type expressions
17
18
19
20
21
22
23       val  mk  :  ?loc:Ast_helper.loc  ->  ?attrs:Ast_helper.attrs  -> Parse‐
24       tree.core_type_desc -> Parsetree.core_type
25
26
27
28
29       val  attr  :  Parsetree.core_type  ->  Parsetree.attribute  ->   Parse‐
30       tree.core_type
31
32
33
34
35       val  any  :  ?loc:Ast_helper.loc  -> ?attrs:Ast_helper.attrs -> unit ->
36       Parsetree.core_type
37
38
39
40
41       val var : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->  string  ->
42       Parsetree.core_type
43
44
45
46
47       val  arrow  :  ?loc:Ast_helper.loc  ->  ?attrs:Ast_helper.attrs -> Ast‐
48       types.arg_label -> Parsetree.core_type -> Parsetree.core_type -> Parse‐
49       tree.core_type
50
51
52
53
54       val  tuple  :  ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs -> Parse‐
55       tree.core_type list -> Parsetree.core_type
56
57
58
59
60       val  constr  :  ?loc:Ast_helper.loc   ->   ?attrs:Ast_helper.attrs   ->
61       Ast_helper.lid -> Parsetree.core_type list -> Parsetree.core_type
62
63
64
65
66       val  object_ : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs -> Parse‐
67       tree.object_field list -> Asttypes.closed_flag -> Parsetree.core_type
68
69
70
71
72       val  class_  :  ?loc:Ast_helper.loc   ->   ?attrs:Ast_helper.attrs   ->
73       Ast_helper.lid -> Parsetree.core_type list -> Parsetree.core_type
74
75
76
77
78       val  alias  :  ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs -> Parse‐
79       tree.core_type -> string -> Parsetree.core_type
80
81
82
83
84       val variant : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->  Parse‐
85       tree.row_field  list -> Asttypes.closed_flag -> Asttypes.label list op‐
86       tion -> Parsetree.core_type
87
88
89
90
91       val  poly   :   ?loc:Ast_helper.loc   ->   ?attrs:Ast_helper.attrs   ->
92       Ast_helper.str list -> Parsetree.core_type -> Parsetree.core_type
93
94
95
96
97       val   package   :  ?loc:Ast_helper.loc  ->  ?attrs:Ast_helper.attrs  ->
98       Ast_helper.lid -> (Ast_helper.lid * Parsetree.core_type) list -> Parse‐
99       tree.core_type
100
101
102
103
104       val  extension  :  ?loc:Ast_helper.loc  ->  ?attrs:Ast_helper.attrs  ->
105       Parsetree.extension -> Parsetree.core_type
106
107
108
109
110       val force_poly : Parsetree.core_type -> Parsetree.core_type
111
112
113
114
115       val varify_constructors : Ast_helper.str list -> Parsetree.core_type ->
116       Parsetree.core_type
117
118
119       varify_constructors newtypes te is type expression te , of which any of
120       nullary type constructor tc is replaced by type variable  of  the  same
121       name,  if  tc  's  name  appears  in  newtypes .  Raise Syntaxerr.Vari‐
122       able_in_scope if any type variable inside te appears in newtypes .
123
124
125       Since 4.05
126
127
128
129
130
131OCamldoc                          2021-01-26                 Ast_helper.Typ(3)
Impressum