@@ -115,19 +115,17 @@ data Elab : Type -> Type where
115115 prim__LookupTy : TTName -> Elab (List (TTName, NameType, TT))
116116 prim__LookupDatatype : TTName -> Elab (List Datatype)
117117
118− prim__Check : Raw -> Elab (TT, TT)
118+ prim__Check : List (TTName, Binder TT) -> Raw -> Elab (TT, TT)
119119
120120 prim__SourceLocation : Elab SourceLocation
121121 prim__Namespace : Elab (List String)
122122
123− prim__Forget : TT -> Elab Raw
124−
125123 prim__Gensym : String -> Elab TTName
126124
127125 prim__Solve : Elab ()
128126 prim__Fill : Raw -> Elab ()
129− prim__Apply : Raw -> List (Bool, Int) -> Elab (List (TTName, TTName))
130− prim__MatchApply : Raw -> List (Bool, Int) -> Elab (List (TTName, TTName))
127+ prim__Apply : Raw -> List Bool -> Elab (List (TTName, TTName))
128+ prim__MatchApply : Raw -> List Bool -> Elab (List (TTName, TTName))
131129 prim__Focus : TTName -> Elab ()
132130 prim__Unfocus : TTName -> Elab ()
133131 prim__Attack : Elab ()
@@ -187,7 +185,7 @@ namespace Tactics
187185 ||| Halt elaboration with an error
188186 fail : List ErrorReportPart -> Elab a
189187 fail err = prim__Fail err
190−
188+
191189 ||| Look up the lexical binding at the focused hole. Fails if no holes are present.
192190 getEnv : Elab (List (TTName, Binder TT))
193191 getEnv = prim__Env
@@ -231,18 +229,11 @@ namespace Tactics
231229 xs => fail [TextPart "More than one datatype named", NamePart n]
232230
233231 ||| Attempt to type-check a term, getting back itself and its type.
234− check : (tm : Raw) -> Elab (TT, TT)
235− check tm = prim__Check tm
236−
237− ||| Convert a type-annotated reflected term to its untyped
238− ||| equivalent.
239− forgetTypes : TT -> Elab Raw
240− forgetTypes tt = prim__Forget tt
241−
242− ||| Get the goal type as a Raw term. Fails if there are no holes.
243− goalType : Elab Raw
244− goalType = do g <- getGoal
245− forgetTypes (snd g)
232+ |||
233+ ||| @ env the environment within which to check the type
234+ ||| @ tm the term to check
235+ check : (env : List (TTName, Binder TT)) -> (tm : Raw) -> Elab (TT, TT)
236+ check env tm = prim__Check env tm
246237
247238
248239 ||| Generate a unique name based on some hint.
@@ -278,10 +269,8 @@ namespace Tactics
278269 ||| where the Boolean states whether or not to attempt to solve
279270 ||| the argument and the Int gives the priority in which to do
280271 ||| so
281− apply : (op : Raw) ->
282− (argSpec : List (Bool, Int)) ->
283− Elab (List (TTName, TTName))
284− apply tm argSpec = prim__Apply tm argSpec
272+ apply : (op : Raw) -> (argSpec : List Bool) -> Elab (List TTName)
273+ apply tm argSpec = map snd <$> prim__Apply tm argSpec
285274
286275 ||| Attempt to apply an operator to fill the current hole,
287276 ||| potentially solving arugments by matching.
@@ -300,10 +289,8 @@ namespace Tactics
300289 ||| where the Boolean states whether or not to attempt to solve
301290 ||| the argument and the Int gives the priority in which to do
302291 ||| so
303− matchApply : (op : Raw) ->
304− (argSpec : List (Bool, Int)) ->
305− Elab (List (TTName, TTName))
306− matchApply tm argSpec = prim__Apply tm argSpec
292+ matchApply : (op : Raw) -> (argSpec : List Bool) -> Elab (List TTName)
293+ matchApply tm argSpec = map snd <$> prim__Apply tm argSpec
307294
308295 ||| Move the focus to the specified hole. Fails if the hole does not
309296 ||| exist.