Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/gallinaGen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ let fixpointBody_ name binders rtype body struc =
let open Vernacexpr in
let feg = { fname=lident_ name;
univs=None;
rec_order=Some (CAst.make (Constrexpr.CStructRec (lident_ struc)));
binders;
rtype;
body_def=Some body;
notations=[] } in
feg
let rec_order = Some (CAst.make (Constrexpr.CStructRec (lident_ struc))) in
rec_order, feg


let match_ cexpr ?rtype bexprs =
Expand Down
4 changes: 2 additions & 2 deletions lib/vernacGen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ let fixpoint_ ~is_rec fexprs =
| [] -> failwith "fixpoint called without fixpoint bodies"
| fexprs_nempty ->
if is_rec
then unit_of_vernacs [ VernacSynPure (VernacFixpoint (NoDischarge, fexprs)) ]
then unit_of_vernacs [ VernacSynPure (VernacFixpoint (NoDischarge, List.split fexprs)) ]
(* if the fixpoint is declared non-recursive we try to turn it into a definition *)
else match fexprs_nempty with
| [{ fname={ v=fname; _ }; binders; rtype; body_def=Some body; _}] ->
| [_, { fname={ v=fname; _ }; binders; rtype; body_def=Some body; _}] ->
definition_ (Names.Id.to_string fname) binders ~rtype body
| [fexpr] -> failwith "Malformed fixpoint body"
| _ -> failwith "A non recursive fixpoint degenerates to a definition so it should only have one body"
Expand Down