Skip to content

Commit d5f257a

Browse files
committed
wip
1 parent 342576e commit d5f257a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/ecHiInductive.ml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ let trans_matchfix
308308
let (indp, ctoridx) = EcDecl.operator_as_ctor ctor in
309309
let indty = oget (EcEnv.Ty.by_path_opt indp env) in
310310
let ind = (oget (EcDecl.tydecl_as_datatype indty)).tydt_ctors in
311-
let ctorsym, ctorty = List.nth ind ctoridx in
311+
let _ctorsym, ctorty = List.nth ind ctoridx in
312312

313313
let args_exp = List.length ctorty in
314314
let args_got = List.length cargs in
@@ -338,20 +338,20 @@ let trans_matchfix
338338
let pvars = List.map (create |- unloc) cargs in
339339
let pvars = List.combine pvars ctorty in
340340

341-
(pb, (indp, ind, (ctorsym, ctoridx)), pvars, xpos)
341+
(pb, (indp, ind), (ctoridx, pvars), xpos)
342342
in
343343

344344
let ptns = List.map trans1 mpty in
345345
let env =
346-
List.fold_left (fun env (_, _, pvars, _) ->
346+
List.fold_left (fun env (_, _, (_, pvars), _) ->
347347
EcEnv.Var.bind_locals pvars env)
348348
env ptns
349349
in
350350

351351
let body = TT.transexpcast env `InOp ue codom body in
352352

353353
let rec check_body =
354-
let (_, _, pvars, pos) =
354+
let (_, _, (_, pvars), pos) =
355355
List.max
356356
~cmp:(fun p1 p2 -> Stdlib.compare (proj4_4 p1) (proj4_4 p2))
357357
ptns in
@@ -376,7 +376,7 @@ let trans_matchfix
376376
List.map trans_b pbsmap
377377
in
378378

379-
let inds = (fun (_, (indp, ind, _), _, _) -> (indp, ind)) in
379+
let inds = fun (_, indp_ind, _, _) -> indp_ind in
380380
let inds = List.map inds (fst (oget (List.ohead pbs))) in
381381
let inds =
382382
List.map (fun (indp, ctors) ->
@@ -390,8 +390,10 @@ let trans_matchfix
390390

391391
List.iter
392392
(fun (ptns, be) ->
393-
let ptns = List.map (fun (_, (_, _, (_, ctor)), pvars, _) ->
394-
(ctor, pvars)) ptns
393+
let ptns =
394+
List.map
395+
(fun (_, _, (ctor, pvars), _) -> (ctor, pvars))
396+
ptns
395397
in
396398
if not (CaseMap.add ptns be casemap) then
397399
fxerror loc env TT.FXE_MatchDupBranches)

0 commit comments

Comments
 (0)