anchor.diff:              let downct (x, _, e) =
                   match x with
                   | Inl x -> (x, e)
  -                | Inr _ -> unexpected () in
  +                | Inr _ -> unexpected rg in
   
               let kw = if rec_ then "let rec" else "let" in
  -            let lenv, ds = Util.fold_map (doc_of_let rec_) env (List.map downct lb) in
  +            let lenv, ds = Util.fold_map (doc_of_let rg rec_) env (List.map downct lb) in
               let doc = reduce1 [
                   text kw; combine (text "and") (List.map group ds); text "in";
  -                doc_of_exp (min_op_prec, NonAssoc) lenv body
  +                doc_of_exp rg (min_op_prec, NonAssoc) lenv body
               ]
   
               in maybe_paren outer e_bin_prio_letin doc
  
positive.code:     group doc
  
  (* -------------------------------------------------------------------- *)
  let is_kind_for_mldtype (k : knd) =
      match k with
      | Kind_type    -> true
      | Kind_unknown -> true
      | Kind_dcon _  -> false
      | Kind_tcon _  -> false
      | Kind_uvar _  -> unexpected  ()
  
  (* -------------------------------------------------------------------- *)
  let mldtype_of_bundle (env : env) (indt : list<sigelt>) =
      let (ts, cs) =
          let fold1 sigelt (types, ctors) =
              match sigelt with
              | Sig_tycon (x, tps, k, ts, cs, _, _) ->
                  if not (is_kind_for_mldtype k) then
                      unsupported ()
                  else
                      ((x.ident.idText, tps, cs) :: types, ctors)
  
              | Sig_datacon (x, ty, pr, _) ->
                  (types, (x.ident.idText, (ty, pr)) :: ctors)
  
              | _ -> unsupported ()
          in
  
          let (ts, cs) = List.foldBack fold1 indt ([], []) in
  
negative.code:             let x = string_of_primop env x.idText in
              if   List.isEmpty es
              then text x
              else cat1 (text x) (groups (List.map (doc_of_exp rg outer env) es))
  
          | Exp_ascribed (e, _) ->
              doc_of_exp rg outer env e
  
          | Exp_meta (Meta_info (e, _, rg)) ->
              doc_of_exp rg outer env e
  
          | Exp_meta (Meta_desugared (e, Data_app)) ->
              let (c, args) =
                  match Absyn.Util.destruct_app e with
                  | Exp_fvar (c, true), args -> (c, args)
                  | _, _ -> unexpected rg
              in
              
              let dargs =
                  List.map
                      (fun (e, _) -> doc_of_exp rg (min_op_prec, NonAssoc) env e) args
              in
              doc_of_constr rg env c.v dargs
              
          | Exp_meta (Meta_desugared (e, Sequence)) -> begin
              match e with
              | Exp_let ((false, [Inl _, _, e1]), e2) ->
                  let d1 = doc_of_exp rg (e_bin_prio_seq, Left ) env e1 in
                  let d2 = doc_of_exp rg (e_bin_prio_seq, Right) env e2 in
  
                  maybe_paren outer e_bin_prio_seq (cat1 (cat d1 (text ";")) d2)
  
              | _ -> unexpected rg
          end
  
          | Exp_meta (Meta_datainst (e, _)) ->
              doc_of_exp rg outer env e
  
          | Exp_tapp (e, _) ->
              (* FIXME: add a type annotation *)
              doc_of_exp rg outer env e
  
          | Exp_app  _ -> unexpected  rg
          | Exp_uvar _ -> unexpected  rg
          | Exp_tabs _ -> unsupported rg
      end
  
  (* -------------------------------------------------------------------- *)
  and maybe_doc_of_primexp_r (rg : range) outer (env : env) (e : exp) =
      let rec strip_tapp e =
          match Absyn.Util.compress_exp e with
          | Exp_tapp     (e, _)
  