lowerUpdate
  (Let (Pattern [] [PatElem v BindVar v_attr]) _ e)
  [DesiredUpdate bindee_nm bindee_attr cs src is val]
  | v == val =
      Just $ return [mkLet [] [(Ident bindee_nm $ typeOf bindee_attr,
                                BindInPlace cs src is)] e,
                     mkLet' [] [Ident v $ typeOf v_attr] $ PrimOp $ Index cs bindee_nm is]
lowerUpdate
  (Let (Pattern [] [PatElem v BindVar v_attr]) _ e)
  [DesiredUpdate bindee_nm bindee_attr cs src is val]
  | v == val =
      Just $ return [mkLet [] [(Ident bindee_nm $ typeOf bindee_attr,
                                BindInPlace cs src is)] e,
                     mkLet' [] [Ident v $ typeOf v_attr] $ PrimOp $ Index cs bindee_nm is]
lowerUpdate
  (Let (Pattern [] [PatElem v BindVar v_attr]) _ e)
  [DesiredUpdate bindee_nm bindee_attr cs src is val]
  | v == val =
      Just $ return [mkLet [] [(Ident bindee_nm $ typeOf bindee_attr,
                                BindInPlace cs src is)] e,
                     mkLet' [] [Ident v $ typeOf v_attr] $ PrimOp $ Index cs bindee_nm is]