val cur_goal: Prims.unit -> Tac typ
let cur_goal () : Tac typ = goal_type (_cur_goal ())
val cur_goal: Prims.unit -> Tac typ
let cur_goal () : Tac typ =
goal_type (_cur_goal ())
FStar.Tactics.V1.Derived.fst.checked
prims.fst.checked FStar.VConfig.fsti.checked FStar.Tactics.Visit.fst.checked FStar.Tactics.V1.SyntaxHelpers.fst.checked FStar.Tactics.V1.Builtins.fsti.checked FStar.Tactics.Util.fst.checked FStar.Tactics.Types.fsti.checked FStar.Tactics.Result.fsti.checked FStar.Tactics.Effect.fsti.checked FStar.Squash.fsti.checked FStar.Reflection.V1.Formula.fst.checked FStar.Reflection.V1.fst.checked FStar.Range.fsti.checked FStar.PropositionalExtensionality.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.Base.fst.checked
FStar.Tactics.V1.Derived.fst
Prims.unit FStar.Tactics.Types.goal_type FStar.Reflection.Types.typ FStar.Tactics.Types.goal FStar.Tactics.V1.Derived._cur_goal
(*
   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.V1.Derived

open FStar.Reflection.V1
open FStar.Reflection.V1.Formula
open FStar.Tactics.Types
open FStar.Tactics.Effect
open FStar.Tactics.Result
open FStar.Tactics.Util
open FStar.Tactics.V1.Builtins
open FStar.Tactics.V1.SyntaxHelpers
open FStar.VConfig

module L = FStar.List.Tot.Base
module V = FStar.Tactics.Visit
private let (@) = L.op_At

let name_of_bv (bv : bv) : Tac string =
    unseal ((inspect_bv bv).bv_ppname)

let bv_to_string (bv : bv) : Tac string =
    (* Could also print type...? *)
    name_of_bv bv

let name_of_binder (b : binder) : Tac string =
    name_of_bv (bv_of_binder b)

let binder_to_string (b : binder) : Tac string =
    bv_to_string (bv_of_binder b) //TODO: print aqual, attributes

exception Goal_not_trivial

let goals () : Tac (list goal) = goals_of (get ())
let smt_goals () : Tac (list goal) = smt_goals_of (get ())

let fail (#a:Type) (m:string)
  : TAC a (fun ps post -> post (Failed (TacticFailure m) ps))
  = raise #a (TacticFailure m)

let fail_silently (#a:Type) (m:string)
  : TAC a (fun _ post -> forall ps. post (Failed (TacticFailure m) ps))
  = set_urgency 0;
    raise #a (TacticFailure m)

(** Return the current *goal*, not its type. (Ignores SMT goals) *)
let _cur_goal () : Tac goal =
    match goals () with
    | []   -> fail "no more goals"
    | g::_ -> g

(** [cur_env] returns the current goal's environment *)
let cur_env () : Tac env = goal_env (_cur_goal ())
val cur_goal: Prims.unit -> Tac typ
_: Prims.unit -> FStar.Tactics.Effect.Tac FStar.Reflection.Types.typ