Skip to content

Commit

Permalink
squasme: avoid gratuitious argument swap
Browse files Browse the repository at this point in the history
  • Loading branch information
Octachron committed Mar 12, 2020
1 parent 1704712 commit 58e5771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions typing/typedecl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ let is_fixed_type sd =

(* Set the row variable in a fixed type. Require
[is_fixed_type decl] as a precondition *)
let set_fixed_row env p loc decl =
let set_fixed_row env loc p decl =
let tm =
match decl.type_manifest with
None -> assert false
Expand Down Expand Up @@ -436,7 +436,7 @@ let transl_declaration env sdecl (id, uid) =
(Longident.Lident(Ident.name id ^ "#row")) env
with Not_found -> assert false
in
set_fixed_row env p sdecl.ptype_loc decl
set_fixed_row env sdecl.ptype_loc p decl
end;
(* Check for cyclic abbreviations *)
begin match decl.type_manifest with None -> ()
Expand Down Expand Up @@ -1439,7 +1439,7 @@ let transl_with_constraint env id ?fixed_row_path orig_decl sdecl =
type_uid = Uid.mk ~current_unit:(Env.get_unit_name ());
}
in
Option.iter (fun p -> set_fixed_row env p sdecl.ptype_loc decl)
Option.iter (fun p -> set_fixed_row env sdecl.ptype_loc p decl)
fixed_row_path;
begin match Ctype.closed_type_decl decl with None -> ()
| Some ty -> raise(Error(sdecl.ptype_loc, Unbound_type_var(ty,decl)))
Expand Down

0 comments on commit 58e5771

Please sign in to comment.