[Git][monnier/typer][master] Missing changes in last commit
Stefan pushed to branch master at Stefan / Typer Commits: 5949b172 by Stefan Monnier at 2016-09-26T20:29:53-04:00 Missing changes in last commit - - - - - 1 changed file: - src/lparse.ml Changes: ===================================== src/lparse.ml ===================================== --- a/src/lparse.ml +++ b/src/lparse.ml @@ -570,17 +570,21 @@ and lexp_read_pattern pattern exp target ctx: ^ "` is not an inductive type!") in (* Remove non explicit argument. *) - let rec remove_nexplicit args acc = - match args with - | [] -> List.rev acc - | (Aexplicit, _, ltp)::tl -> remove_nexplicit tl (ltp::acc) - | hd::tl -> remove_nexplicit tl acc in - - let cons_args = remove_nexplicit cons_args [] in - - (* read pattern args *) - let args, nctx = lexp_read_pattern_args args cons_args ctx in - (cons_name, loc, args), nctx + let rec remove_nexplicit args acc = + match args with + | [] -> List.rev acc + | (Aexplicit, _, ltp)::tl -> remove_nexplicit tl (ltp::acc) + | hd::tl -> remove_nexplicit tl acc in + + let cons_args = remove_nexplicit cons_args [] in + + (* read pattern args *) + let args, nctx = lexp_read_pattern_args args cons_args ctx in + (cons_name, loc, args), nctx + | _ -> lexp_warning (pexp_location ctor) + ("Invalid constructor `" + ^ (pexp_to_string ctor) ^ "`"); + ("_", pexp_location ctor, []), ctx (* Read patterns inside a constructor *) and lexp_read_pattern_args args (args_type : lexp list) ctx: View it on GitLab: https://gitlab.com/monnier/typer/commit/5949b172d8b5f6635b0896a0aea29db44e08...
Afficher les réponses par date
participants (1)
-
Stefan