Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 9b0e240

Browse files
committed
Tweak
1 parent c204c78 commit 9b0e240

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

interpreter/syntax/free.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,15 @@ let import_desc (d : import_desc) =
166166
let export (e : export) = export_desc e.it.edesc
167167
let import (i : import) = import_desc i.it.idesc
168168

169-
let start (s : idx option) =
170-
funcs (Lib.Option.get (Lib.Option.map idx s) Set.empty)
169+
let start (s : idx) = funcs (idx s)
171170

172171
let module_ (m : module_) =
173172
list type_ m.it.types ++
174173
list global m.it.globals ++
175174
list table m.it.tables ++
176175
list memory m.it.memories ++
177176
list func m.it.funcs ++
178-
start m.it.start ++
177+
opt start m.it.start ++
179178
list elem m.it.elems ++
180179
list data m.it.datas ++
181180
list import m.it.imports ++

interpreter/syntax/free.mli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ val elem : Ast.elem_segment -> t
2929
val data : Ast.data_segment -> t
3030
val export : Ast.export -> t
3131
val import : Ast.import -> t
32-
val start : Ast.idx option -> t
32+
val start : Ast.idx -> t
3333

3434
val module_ : Ast.module_ -> t
3535

36+
val opt : ('a -> t) -> 'a option -> t
3637
val list : ('a -> t) -> 'a list -> t

0 commit comments

Comments
 (0)