val r_binder_to_namedv (b: binder) : R.namedv
let r_binder_to_namedv (b : binder) : R.namedv =
  pack_namedv {
    uniq   = b.uniq;
    sort   = seal b.sort;
    ppname = b.ppname;
  }
val r_binder_to_namedv (b: binder) : R.namedv
let r_binder_to_namedv (b: binder) : R.namedv =
pack_namedv ({ uniq = b.uniq; sort = seal b.sort; ppname = b.ppname })
FStar.Tactics.NamedView.fst.checked
prims.fst.checked FStar.Tactics.V2.Builtins.fsti.checked FStar.Tactics.Util.fst.checked FStar.Tactics.Effect.fsti.checked FStar.Reflection.V2.Data.fsti.checked FStar.Reflection.V2.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked
FStar.Tactics.NamedView.fst
FStar.Tactics.NamedView.binder FStar.Reflection.V2.Builtins.pack_namedv FStar.Reflection.V2.Data.Mknamedv_view FStar.Tactics.NamedView.__proj__Mkbinder__item__uniq FStar.Sealed.seal FStar.Reflection.Types.typ FStar.Tactics.NamedView.__proj__Mkbinder__item__sort FStar.Tactics.NamedView.__proj__Mkbinder__item__ppname FStar.Reflection.Types.namedv
(*
   Copyright 2008-2018 Microsoft Research

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*)
module FStar.Tactics.NamedView

(* inner let bindings not encoded, OK *)
#set-options "--warn_error -242"

(* This file is part of the tactics core, we open only what's needed. *)
open FStar.Tactics.Effect
open FStar.Tactics.Util
open FStar.Tactics.V2.Builtins

exception LengthMismatch
exception NotEnoughBinders

(* We work with reflection V2. *)
module R = FStar.Reflection.V2
module RD = FStar.Reflection.V2.Data

let open_universe_view (v:RD.universe_view) : named_universe_view =
  match v with
  | R.Uv_Zero -> Uv_Zero
  | R.Uv_Succ u -> Uv_Succ u
  | R.Uv_Max us -> Uv_Max us
  | R.Uv_BVar n -> Uv_BVar n
  | R.Uv_Name i -> Uv_Name (inspect_ident i)
  | R.Uv_Unif uvar -> Uv_Unif uvar
  | R.Uv_Unk -> Uv_Unk

let inspect_universe (u:universe) : named_universe_view =
  let v = R.inspect_universe u in
  open_universe_view v

let close_universe_view (v:named_universe_view) : R.universe_view =
  match v with
  | Uv_Zero -> R.Uv_Zero
  | Uv_Succ u -> R.Uv_Succ u
  | Uv_Max us -> R.Uv_Max us
  | Uv_BVar n -> R.Uv_BVar n
  | Uv_Name i -> R.Uv_Name (pack_ident i)
  | Uv_Unif uvar -> R.Uv_Unif uvar
  | Uv_Unk -> R.Uv_Unk

let pack_universe (uv:named_universe_view) : universe =
  let uv = close_universe_view uv in
  R.pack_universe uv

private
let __binding_to_binder (bnd : binding) (b : R.binder) : binder =
  {
      ppname = bnd.ppname;
      uniq   = bnd.uniq;
      sort   = bnd.sort;
      qual   = (inspect_binder b).qual;
      attrs  = (inspect_binder b).attrs;
  }

private
val r_binder_to_namedv (b: binder) : R.namedv
b: FStar.Tactics.NamedView.binder -> FStar.Reflection.Types.namedv