@@ -144,6 +144,7 @@ data Elab : Type -> Type where
144144 prim__DeclareType : TyDecl -> Elab ()
145145 prim__DefineFunction : FunDefn -> Elab ()
146146 prim__AddInstance : TTName -> TTName -> Elab ()
147+ prim__IsTCName : TTName -> Elab Bool
147148
148149 prim__ResolveTC : TTName -> Elab ()
149150 prim__Search : Int -> List TTName -> Elab ()
@@ -427,13 +428,19 @@ namespace Tactics
427428 defineFunction : FunDefn -> Elab ()
428429 defineFunction defun = prim__DefineFunction defun
429430
430− ||| Register a new instance for type class resolution
431+ ||| Register a new instance for type class resolution.
431432 |||
432433 ||| @ className the name of the class for which an instance is being registered
433434 ||| @ instName the name of the definition to use in instance search
434435 addInstance : (className, instName : TTName) -> Elab ()
435436 addInstance className instName = prim__AddInstance className instName
436437
438+ ||| Determine whether a name denotes a class.
439+ |||
440+ ||| @ name a name that might denote a class.
441+ isTCName : (name : TTName) -> Elab Bool
442+ isTCName name = prim__IsTCName name
443+
437444 ||| Attempt to solve the current goal with a type class dictionary
438445 |||
439446 ||| @ fn the name of the definition being elaborated (to prevent Idris