anchor.diff:        let env = List.fold (fun env (x, t) -> push_id env x t) env xs in
         let (t, ae) = infer_exp env u e None in
         let ae = AE_Bind (Lambda, [], List.map (fun (x, t) -> (x, Some t)) xs, ts, ae) in
  -      norm_ret (TFun (List.map snd xs, t)) ae
  +      ret (TFun (List.map snd xs, t)) ae
     | ECast (e, tc) ->
         let (t, ae) = infer_exp env u e None in
         let ae = AE_Cast (ae, tc) in
  -      norm_ret tc ae
  +      ret tc ae
         //REVIEW: casts across arbitrary types seem to be useful (e.g. for module friends)
         //// TODO: move this check to after inference:
         //if (is_subtype env t tc_norm || is_subtype env tc_norm t) then norm_ret tc ae
  
positive.code:         | _ -> err "only inline variables and global const variables are allowed in inline expressions"
          in
        ret t (AE_Exp e)
    | EInt i -> norm_ret (TInt (Int i, Int i)) (AE_Exp e)
    | EReal r -> norm_ret (TName (Id "real")) (AE_Exp e)
  //    | EBitVector (n, i) -> TODO
    | EBool b -> norm_ret tBool (AE_Exp e)
    | EString s -> norm_ret (TName (Id "string")) (AE_Exp e)
    | EOp (Uop (UConst | UOld) as op, [e]) ->
        let (t, ae) = infer_exp env u e expected_typ in
        ret t (AE_Op (op, [ae]))
    | EOp (Uop UNeg, [e]) ->
        let (t, ae) = infer_exp env u e None in
        let t = neg_int_bound t in
        norm_ret t (AE_Op (Uop UNeg, [ae]))
    | EOp (Uop (UNot _) as op, [e]) ->
        let tv = u_next_type_var u in
        let et = match expected_typ with | None -> tv | Some t -> t in
  
negative.code:     u.ut_uppers <- map_list_add x1 (t2, u.u_loc) u.ut_uppers
    | ((TInt _ | TBool _), TVar (x2, _)) ->
      u.ut_lowers <- map_list_add x2 (t1, u.u_loc) u.ut_lowers
    | (TInt _, TInt _) when is_subtype env t1 t2 -> ()
    | (TBool BpBool, TBool BpProp) -> ()
    | _ -> u_constrain_equal_loc u loc t1 t2
  
  