Module Loc.
Definition type (l: loc) : typ :=
match l with
| R r => mreg_type r
| S sl pos ty => ty
end.
Definition diff_dec (l1 l2: loc) : { Loc.diff l1 l2 } + { ~Loc.diff l1 l2 }.
(** [Loc.norepet ll] holds if the locations in list [ll] are pairwise different. *)
Inductive norepet : list loc -> Prop :=
| norepet_nil:
norepet nil
| norepet_cons:
forall hd tl, notin hd tl -> norepet tl -> norepet (hd :: tl).

Lemma gss_typed: forall l v m, Val.has_type v (Loc.type l) -> (set l v m) l = v.