Skip to content

Commit c5cd46e

Browse files
committed
add type annotations to fully qualified instances of inductive types like (List Nat)
1 parent 58f01d0 commit c5cd46e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/ocaml/frank.ml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ and print_term_depth depth t =
265265

266266
and print_term t = print_term_depth 0 t
267267

268-
269268
(* ENV *)
270269

271270
let empty_def = { name = "Empty"; params = []; level = 0; constrs = [] }
@@ -283,13 +282,11 @@ let w_def_params (a: term)(at: term) (b: term) (bt: term) = { name = "W"; params
283282
let w_def (a: term) (at: term) (b: term) (bt: term) = { (w_def_params a at b bt) with constrs = [
284283
(1, Pi ("x", Var "A", Pi ("f", Pi ("_", App (Var "B", Var "x"), Inductive (w_def_params a at b bt)), Inductive (w_def_params a at b bt)) )) ] }
285284

286-
287-
let w_nat = w_def (Inductive bool_def)
288-
(Universe 0)
289-
(Lam ("x", Inductive bool_def,
290-
Ind (bool_def, Pi ("_", Inductive bool_def, Universe 0),
291-
[Inductive empty_def; Inductive unit_def], Var "x")))
292-
(Pi ("x", Inductive bool_def, Universe 0))
285+
let w_nat =
286+
w_def (Inductive bool_def)
287+
(Universe 0)
288+
(Lam ("x", Inductive bool_def, Ind (bool_def, Pi ("_", Inductive bool_def, Universe 0), [Inductive empty_def; Inductive unit_def], Var "x")))
289+
(Pi ("x", Inductive bool_def, Universe 0))
293290

294291
let nat_def_params = { name = "Nat"; params = []; level = 0; constrs = []}
295292
let nat_def = { nat_def_params with constrs = [

0 commit comments

Comments
 (0)