mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-09-22 14:38:20 +03:00
Add goalType tactic
This is a derived tactic that I've defined in every non-trivial use of Elab. Better put it in the library.
This commit is contained in:
parent
763ac00bfd
commit
30585fcddd
@ -7,6 +7,7 @@ module Language.Reflection.Elab
|
||||
|
||||
import Builtins
|
||||
import Prelude.Applicative
|
||||
import Prelude.Basics
|
||||
import Prelude.Bool
|
||||
import Prelude.Functor
|
||||
import Prelude.List
|
||||
@ -224,6 +225,12 @@ namespace Tactics
|
||||
forgetTypes : TT -> Elab Raw
|
||||
forgetTypes tt = prim__Forget tt
|
||||
|
||||
||| Get the goal type as a Raw term
|
||||
goalType : Elab Raw
|
||||
goalType = do g <- getGoal
|
||||
forgetTypes (snd g)
|
||||
|
||||
|
||||
||| Generate a unique name based on some hint.
|
||||
|||
|
||||
||| **NB**: the generated name is unique _for this run of the
|
||||
|
Loading…
Reference in New Issue
Block a user