Skip to content

Commit c5998d1

Browse files
committed
[interpreter] Name the type Utf8.unicode
1 parent dd62e92 commit c5998d1

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

binary/utf8.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
type codepoint = int
2+
type unicode = codepoint list
3+
14
exception Utf8
25

36
let con n = 0x80 lor (n land 0x3f)

binary/utf8.mli

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
type codepoint = int
2+
type unicode = codepoint list
3+
14
exception Utf8
25

3-
val decode : string -> int list (* raises Utf8 *)
4-
val encode : int list -> string (* raises Utf8 *)
6+
val decode : string -> unicode (* raises Utf8 *)
7+
val encode : unicode -> string (* raises Utf8 *)

syntax/ast.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ type vec_laneop = (vec_type, pack_size) memop * int
130130
type var = int32 Source.phrase
131131
type num = Values.num Source.phrase
132132
type vec = Values.vec Source.phrase
133-
type name = int list
133+
type name = Utf8.unicode
134134

135135
type block_type = VarBlockType of var | ValBlockType of value_type option
136136

0 commit comments

Comments
 (0)