forked from camlspotter/ocamloscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstype_print.mli
41 lines (28 loc) · 1.01 KB
/
stype_print.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
open Spotlib.Spot
open Stype_core
val oformat : Format.t -> t -> unit
val print : (Spath.t -> Printer.t) (** Spath printer *)
-> t
-> Printer.t
val format_gen : (Spath.t -> Printer.t) (** Spath printer *)
-> Format.t
-> t
-> unit
val format : Format.t
-> t
-> unit
val to_string : t -> string
val show : t -> string
(** Very precise printing aimed to be [read] *)
val read : string -> (t, string) Result.t
(** Unfortunately, [read (show ty) <> ty]. It only assures the alpha-equiv.
This is since [show] discard type variable indices and rename them
if necessary.
*)
val cannot_read : t -> bool
(** Some types made by ocamloscope is not parsable for XParser for now.
For example,
type record = { id : 'a . 'a -> 'a }
val id : record -> 'a . 'a -> 'a
We must skip this kind of type from show-read tests.
*)