on master help sign in
Rename Tactical to Elab
commitc3def79a99fba5898490fd761ef15db8aad04ac0 authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateWed 8 Apr 2015, 10:46 (12 years ago) parent7d02904
14 files changed+185−185
libs/prelude/Language/Reflection/Elab.idr+149 libs/prelude/Language/Reflection/Tactical.idr−149 libs/prelude/prelude.ipkg+1−1 src/Idris/AbsSyntax.hs+4−4 src/Idris/AbsSyntaxTree.hs+1−1 src/Idris/DSL.hs+2−2 src/Idris/DeepSeq.hs+1−1 src/Idris/ElabQuasiquote.hs+2−2 src/Idris/ElabTerm.hs+6−6 src/Idris/Error.hs+1−1 src/Idris/IBC.hs+4−4 src/Idris/IdrisDoc.hs+1−1 src/Idris/ParseExpr.hs+9−9 test/tactics001/Tactics.idr+4−4
libs/prelude/Language/Reflection/Elab.idrnew file+149
@@ -0,0 +1,149 @@
1+module Language.Reflection.Elab
2+
3+import Builtins
4+import Prelude.Applicative
5+import Prelude.Functor
6+import Prelude.List
7+import Prelude.Maybe
8+import Prelude.Monad
9+import Language.Reflection
10+
11+data Arg : Type where
12+ Explicit : TTName -> Raw -> Arg
13+ Implicit : TTName -> Raw -> Arg
14+ Constraint : TTName -> Raw -> Arg
15+
16+data TyDecl : Type where
17+ Declare : TTName -> List Arg -> Raw -> TyDecl
18+
19+data FunClause : Type where
20+ MkFunClause : (lhs, rhs : Raw) -> FunClause
21+ MkImpossibleClause : (lhs : Raw) -> FunClause
22+
23+data FunDefn : Type where
24+ DefineFun : TTName -> List FunClause -> FunDefn
25+
26+abstract
27+data Elab : Type -> Type where
28+ -- obligatory control stuff
29+ prim__PureElab : a -> Elab a
30+ prim__BindElab : {a, b : Type} -> Elab a -> (a -> Elab b) -> Elab b
31+
32+ prim__Try : {a : Type} -> Elab a -> Elab a -> Elab a
33+ prim__Fail : {a : Type} -> List ErrorReportPart -> Elab a
34+
35+ prim__Env : Elab (List (TTName, Binder TT))
36+ prim__Goal : Elab (TTName, TT)
37+ prim__Holes : Elab (List TTName)
38+ prim__Guess : Elab (Maybe TT)
39+
40+ prim__SourceLocation : Elab SourceLocation
41+
42+ prim__Forget : TT -> Elab Raw
43+
44+ prim__Gensym : String -> Elab TTName
45+
46+ prim__Solve : Elab ()
47+ prim__Fill : Raw -> Elab ()
48+ prim__Focus : TTName -> Elab ()
49+ prim__Unfocus : TTName -> Elab ()
50+ prim__Attack : Elab ()
51+
52+ prim__Rewrite : Raw -> Elab ()
53+
54+ prim__Claim : TTName -> Raw -> Elab ()
55+ prim__Intro : Maybe TTName -> Elab ()
56+
57+ prim__DeclareType : TyDecl -> Elab ()
58+ prim__DefineFunction : FunDefn -> Elab ()
59+
60+ prim__Debug : {a : Type} -> Maybe String -> Elab a
61+
62+
63+-------------
64+-- Public API
65+-------------
66+%access public
67+
68+instance Functor Elab where
69+ map f t = prim__BindElab t (\x => prim__PureElab (f x))
70+
71+instance Applicative Elab where
72+ pure x = prim__PureElab x
73+ f <*> x = prim__BindElab f $ \g =>
74+ prim__BindElab x $ \y =>
75+ prim__PureElab $ g y
76+
77+instance Alternative Elab where
78+ empty = prim__Fail [TextPart "empty"]
79+ x <|> y = prim__Try x y
80+
81+instance Monad Elab where
82+ x >>= f = prim__BindElab x f
83+
84+fail : List ErrorReportPart -> Elab a
85+fail err = prim__Fail err
86+
87+getEnv : Elab (List (TTName, Binder TT))
88+getEnv = prim__Env
89+
90+getGoal : Elab (TTName, TT)
91+getGoal = prim__Goal
92+
93+getHoles : Elab (List TTName)
94+getHoles = prim__Holes
95+
96+getGuess : Elab (Maybe TT)
97+getGuess = prim__Guess
98+
99+forgetTypes : TT -> Elab Raw
100+forgetTypes tt = prim__Forget tt
101+
102+gensym : (hint : String) -> Elab TTName
103+gensym hint = prim__Gensym hint
104+
105+solve : Elab ()
106+solve = prim__Solve
107+
108+fill : Raw -> Elab ()
109+fill tm = prim__Fill tm
110+
111+focus : (hole : TTName) -> Elab ()
112+focus hole = prim__Focus hole
113+
114+unfocus : TTName -> Elab ()
115+unfocus hole = prim__Unfocus hole
116+
117+attack : Elab ()
118+attack = prim__Attack
119+
120+claim : TTName -> Raw -> Elab ()
121+claim n ty = prim__Claim n ty
122+
123+intro : Maybe TTName -> Elab ()
124+intro n = prim__Intro n
125+
126+||| Find out the present source context for the tactic script
127+getSourceLocation : Elab SourceLocation
128+getSourceLocation = prim__SourceLocation
129+
130+||| Attempt to solve the current goal with the source code location
131+sourceLocation : Elab ()
132+sourceLocation = do loc <- getSourceLocation
133+ fill (quote loc)
134+ solve
135+
136+rewriteWith : Raw -> Elab ()
137+rewriteWith rule = prim__Rewrite rule
138+
139+declareType : TyDecl -> Elab ()
140+declareType decl = prim__DeclareType decl
141+
142+defineFunction : FunDefn -> Elab ()
143+defineFunction defun = prim__DefineFunction defun
144+
145+debug : Elab a
146+debug = prim__Debug Nothing
147+
148+debugMessage : String -> Elab a
149+debugMessage msg = prim__Debug (Just msg)
libs/prelude/Language/Reflection/Tactical.idrdeleted−149
@@ -1,149 +0,0 @@
1−module Language.Reflection.Tactical
2−
3−import Builtins
4−import Prelude.Applicative
5−import Prelude.Functor
6−import Prelude.List
7−import Prelude.Maybe
8−import Prelude.Monad
9−import Language.Reflection
10−
11−data Arg : Type where
12− Explicit : TTName -> Raw -> Arg
13− Implicit : TTName -> Raw -> Arg
14− Constraint : TTName -> Raw -> Arg
15−
16−data TyDecl : Type where
17− Declare : TTName -> List Arg -> Raw -> TyDecl
18−
19−data FunClause : Type where
20− MkFunClause : (lhs, rhs : Raw) -> FunClause
21− MkImpossibleClause : (lhs : Raw) -> FunClause
22−
23−data FunDefn : Type where
24− DefineFun : TTName -> List FunClause -> FunDefn
25−
26−abstract
27−data Tactical : Type -> Type where
28− -- obligatory control stuff
29− prim__PureTactical : a -> Tactical a
30− prim__BindTactical : {a, b : Type} -> Tactical a -> (a -> Tactical b) -> Tactical b
31−
32− prim__Try : {a : Type} -> Tactical a -> Tactical a -> Tactical a
33− prim__Fail : {a : Type} -> List ErrorReportPart -> Tactical a
34−
35− prim__Env : Tactical (List (TTName, Binder TT))
36− prim__Goal : Tactical (TTName, TT)
37− prim__Holes : Tactical (List TTName)
38− prim__Guess : Tactical (Maybe TT)
39−
40− prim__SourceLocation : Tactical SourceLocation
41−
42− prim__Forget : TT -> Tactical Raw
43−
44− prim__Gensym : String -> Tactical TTName
45−
46− prim__Solve : Tactical ()
47− prim__Fill : Raw -> Tactical ()
48− prim__Focus : TTName -> Tactical ()
49− prim__Unfocus : TTName -> Tactical ()
50− prim__Attack : Tactical ()
51−
52− prim__Rewrite : Raw -> Tactical ()
53−
54− prim__Claim : TTName -> Raw -> Tactical ()
55− prim__Intro : Maybe TTName -> Tactical ()
56−
57− prim__DeclareType : TyDecl -> Tactical ()
58− prim__DefineFunction : FunDefn -> Tactical ()
59−
60− prim__Debug : {a : Type} -> Maybe String -> Tactical a
61−
62−
63−-------------
64−-- Public API
65−-------------
66−%access public
67−
68−instance Functor Tactical where
69− map f t = prim__BindTactical t (\x => prim__PureTactical (f x))
70−
71−instance Applicative Tactical where
72− pure x = prim__PureTactical x
73− f <*> x = prim__BindTactical f $ \g =>
74− prim__BindTactical x $ \y =>
75− prim__PureTactical $ g y
76−
77−instance Alternative Tactical where
78− empty = prim__Fail [TextPart "empty"]
79− x <|> y = prim__Try x y
80−
81−instance Monad Tactical where
82− x >>= f = prim__BindTactical x f
83−
84−fail : List ErrorReportPart -> Tactical a
85−fail err = prim__Fail err
86−
87−getEnv : Tactical (List (TTName, Binder TT))
88−getEnv = prim__Env
89−
90−getGoal : Tactical (TTName, TT)
91−getGoal = prim__Goal
92−
93−getHoles : Tactical (List TTName)
94−getHoles = prim__Holes
95−
96−getGuess : Tactical (Maybe TT)
97−getGuess = prim__Guess
98−
99−forgetTypes : TT -> Tactical Raw
100−forgetTypes tt = prim__Forget tt
101−
102−gensym : (hint : String) -> Tactical TTName
103−gensym hint = prim__Gensym hint
104−
105−solve : Tactical ()
106−solve = prim__Solve
107−
108−fill : Raw -> Tactical ()
109−fill tm = prim__Fill tm
110−
111−focus : (hole : TTName) -> Tactical ()
112−focus hole = prim__Focus hole
113−
114−unfocus : TTName -> Tactical ()
115−unfocus hole = prim__Unfocus hole
116−
117−attack : Tactical ()
118−attack = prim__Attack
119−
120−claim : TTName -> Raw -> Tactical ()
121−claim n ty = prim__Claim n ty
122−
123−intro : Maybe TTName -> Tactical ()
124−intro n = prim__Intro n
125−
126−||| Find out the present source context for the tactic script
127−getSourceLocation : Tactical SourceLocation
128−getSourceLocation = prim__SourceLocation
129−
130−||| Attempt to solve the current goal with the source code location
131−sourceLocation : Tactical ()
132−sourceLocation = do loc <- getSourceLocation
133− fill (quote loc)
134− solve
135−
136−rewriteWith : Raw -> Tactical ()
137−rewriteWith rule = prim__Rewrite rule
138−
139−declareType : TyDecl -> Tactical ()
140−declareType decl = prim__DeclareType decl
141−
142−defineFunction : FunDefn -> Tactical ()
143−defineFunction defun = prim__DefineFunction defun
144−
145−debug : Tactical a
146−debug = prim__Debug Nothing
147−
148−debugMessage : String -> Tactical a
149−debugMessage msg = prim__Debug (Just msg)
libs/prelude/prelude.ipkg+1−1
@@ -10,7 +10,7 @@ modules = Builtins, Prelude, IO,
1010 Prelude.Foldable, Prelude.Traversable, Prelude.Bits, Prelude.Stream,
1111 Prelude.Uninhabited, Prelude.Pairs, Prelude.Providers,
1212
13− Language.Reflection, Language.Reflection.Errors, Language.Reflection.Tactical,
13+ Language.Reflection, Language.Reflection.Errors, Language.Reflection.Elab,
1414
1515 Decidable.Equality
1616
src/Idris/AbsSyntax.hs+4−4
@@ -1011,7 +1011,7 @@ expandParams dec ps ns infs tm = en tm
10111011 en (PApp fc f as) = PApp fc (en f) (map (fmap en) as)
10121012 en (PAppBind fc f as) = PAppBind fc (en f) (map (fmap en) as)
10131013 en (PCase fc c os) = PCase fc (en c) (map (pmap en) os)
1014− en (PRunTactics fc tm) = PRunTactics fc (en tm)
1014+ en (PRunElab fc tm) = PRunElab fc (en tm)
10151015 en t = t
10161016
10171017 nselem x [] = False
@@ -1485,7 +1485,7 @@ implicitise syn ignore ist tm = -- trace ("INCOMING " ++ showImp True tm) $
14851485 imps top env (PHidden tm) = imps False env tm
14861486 imps top env (PUnifyLog tm) = imps False env tm
14871487 imps top env (PNoImplicits tm) = imps False env tm
1488− imps top env (PRunTactics fc tm) = imps False env tm
1488+ imps top env (PRunElab fc tm) = imps False env tm
14891489 imps top env _ = return ()
14901490
14911491 pibind using [] sc = sc
@@ -1612,7 +1612,7 @@ addImpl' inpat env infns imp_meths ist ptm
16121612 ai qq env ds (PQuasiquote tm g) = PQuasiquote (ai True env ds tm)
16131613 (fmap (ai True env ds) g)
16141614 ai qq env ds (PUnquote tm) = PUnquote (ai False env ds tm)
1615− ai qq env ds (PRunTactics fc tm) = PRunTactics fc (ai False env ds tm)
1615+ ai qq env ds (PRunElab fc tm) = PRunElab fc (ai False env ds tm)
16161616 ai qq env ds tm = tm
16171617
16181618 handleErr (Left err) = PElabError err
@@ -2149,5 +2149,5 @@ mkUniqueNames env tm = evalState (mkUniq tm) (S.fromList env) where
21492149 mkUniq (PNoImplicits t) = liftM PNoImplicits (mkUniq t)
21502150 mkUniq (PProof ts) = liftM PProof (mapM mkUniqT ts)
21512151 mkUniq (PTactics ts) = liftM PTactics (mapM mkUniqT ts)
2152− mkUniq (PRunTactics fc ts) = liftM (PRunTactics fc ) (mkUniq ts)
2152+ mkUniq (PRunElab fc ts) = liftM (PRunElab fc ) (mkUniq ts)
21532153 mkUniq t = return t
src/Idris/AbsSyntaxTree.hs+1−1
@@ -826,7 +826,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
826826 | PNoImplicits PTerm -- ^ never run implicit converions on the term
827827 | PQuasiquote PTerm (Maybe PTerm) -- ^ `(Term [: Term])
828828 | PUnquote PTerm -- ^ ~Term
829− | PRunTactics FC PTerm -- ^ %runTactics tm - New-style proof script
829+ | PRunElab FC PTerm -- ^ %runElab tm - New-style proof script
830830 deriving (Eq, Data, Typeable)
831831
832832
src/Idris/DSL.hs+2−2
@@ -108,7 +108,7 @@ expandDo dsl (PDoBlock ds)
108108 block b _ = PElabError (Msg "Invalid statement in do block")
109109
110110expandDo dsl (PIdiom fc e) = expandDo dsl $ unIdiom (dsl_apply dsl) (dsl_pure dsl) fc e
111−expandDo dsl (PRunTactics fc tm) = PRunTactics fc $ expandDo dsl tm
111+expandDo dsl (PRunElab fc tm) = PRunElab fc $ expandDo dsl tm
112112expandDo dsl t = t
113113
114114-- | Replace DSL-bound variable in a term
@@ -195,7 +195,7 @@ debind b tm = let (tm', (bs, _)) = runState (db' tm) ([], 0) in
195195 db' (PDPair fc p l t r) = do l' <- db' l
196196 r' <- db' r
197197 return (PDPair fc p l' t r')
198− db' (PRunTactics fc t) = fmap (PRunTactics fc) (db' t)
198+ db' (PRunElab fc t) = fmap (PRunElab fc) (db' t)
199199 db' t = return t
200200
201201 dbArg a = do t' <- db' (getTm a)
src/Idris/DeepSeq.hs+1−1
@@ -243,7 +243,7 @@ instance NFData PTerm where
243243 rnf (PNoImplicits x1) = rnf x1 `seq` ()
244244 rnf (PQuasiquote x1 x2) = rnf x1 `seq` rnf x2 `seq` ()
245245 rnf (PUnquote x1) = rnf x1 `seq` ()
246− rnf (PRunTactics x1 x2) = rnf x1 `seq` rnf x2 `seq` ()
246+ rnf (PRunElab x1 x2) = rnf x1 `seq` rnf x2 `seq` ()
247247
248248instance (NFData t) => NFData (PTactic' t) where
249249 rnf (Intro x1) = rnf x1 `seq` ()
src/Idris/ElabQuasiquote.hs+2−2
@@ -170,8 +170,8 @@ extractUnquotes n (PUnquote tm)
170170 return (PRef (fileFC "(unquote)") n, [(n, tm)])
171171 | otherwise = fmap (\(tm', ex) -> (PUnquote tm', ex)) $
172172 extractUnquotes (n-1) tm
173−extractUnquotes n (PRunTactics fc tm)
174− = fmap (\(tm', ex) -> (PRunTactics fc tm', ex)) $ extractUnquotes n tm
173+extractUnquotes n (PRunElab fc tm)
174+ = fmap (\(tm', ex) -> (PRunElab fc tm', ex)) $ extractUnquotes n tm
175175extractUnquotes n x = return (x, []) -- no subterms!
176176
177177
src/Idris/ElabTerm.hs+6−6
@@ -220,7 +220,7 @@ goal_polymorphic =
220220
221221-- | Returns the set of declarations we need to add to complete the
222222-- definition (most likely case blocks to elaborate) as well as
223−-- declarations resulting from user tactic scripts (%runTactics)
223+-- declarations resulting from user tactic scripts (%runElab)
224224elab :: IState -> ElabInfo -> ElabMode -> FnOpts -> Name -> PTerm ->
225225 ElabD ()
226226elab ist info emode opts fn tm
@@ -1107,11 +1107,11 @@ elab ist info emode opts fn tm
11071107 delayElab $ do focus h
11081108 dotterm
11091109 elab' ina fc t
1110− elab' ina fc (PRunTactics fc' tm) =
1110+ elab' ina fc (PRunElab fc' tm) =
11111111 do attack
11121112 n <- getNameFrom (sMN 0 "tacticScript")
11131113 n' <- getNameFrom (sMN 0 "tacticExpr")
1114− let scriptTy = RApp (Var (sNS (sUN "Tactical") ["Tactical", "Reflection", "Language"])) (Var unitTy)
1114+ let scriptTy = RApp (Var (sNS (sUN "Elab") ["Elab", "Reflection", "Language"])) (Var unitTy)
11151115 claim n scriptTy
11161116 movelast n
11171117 letbind n' scriptTy (Var n)
@@ -1590,7 +1590,7 @@ case_ ind autoSolve ist fn tm = do
15901590 when autoSolve solveAll
15911591
15921592tacN :: String -> Name
1593−tacN str = sNS (sUN str) ["Tactical", "Reflection", "Language"]
1593+tacN str = sNS (sUN str) ["Elab", "Reflection", "Language"]
15941594
15951595runTactical :: FC -> Env -> Term -> ElabD ()
15961596runTactical fc env tm = do tm' <- eval tm
@@ -1679,9 +1679,9 @@ runTactical fc env tm = do tm' <- eval tm
16791679 = do errs' <- eval errs
16801680 parts <- reifyReportParts errs'
16811681 lift . tfail $ ReflectionError [parts] (Msg "")
1682− | n == tacN "prim__PureTactical", [_a, tm] <- args
1682+ | n == tacN "prim__PureElab", [_a, tm] <- args
16831683 = return tm
1684− | n == tacN "prim__BindTactical", [_a, _b, first, andThen] <- args
1684+ | n == tacN "prim__BindElab", [_a, _b, first, andThen] <- args
16851685 = do first' <- eval first
16861686 res <- runTacTm first'
16871687 next <- eval (App andThen res)
src/Idris/Error.hs+1−1
@@ -148,4 +148,4 @@ warnDisamb ist (PQuasiquote tm goal) = warnDisamb ist tm >>
148148warnDisamb ist (PUnquote tm) = warnDisamb ist tm
149149warnDisamb ist (PAs _ _ tm) = warnDisamb ist tm
150150warnDisamb ist (PAppImpl tm _) = warnDisamb ist tm
151−warnDisamb ist (PRunTactics _ tm) = warnDisamb ist tm
151+warnDisamb ist (PRunElab _ tm) = warnDisamb ist tm
src/Idris/IBC.hs+4−4
@@ -1674,9 +1674,9 @@ instance Binary PTerm where
16741674 put x2
16751675 PUniverse x1 -> do putWord8 38
16761676 put x1
1677− PRunTactics x1 x2 -> do putWord8 39
1678− put x1
1679− put x2
1677+ PRunElab x1 x2 -> do putWord8 39
1678+ put x1
1679+ put x2
16801680 PAs x1 x2 x3 -> do putWord8 40
16811681 put x1
16821682 put x2
@@ -1809,7 +1809,7 @@ instance Binary PTerm where
18091809 return (PUniverse x1)
18101810 39 -> do x1 <- get
18111811 x2 <- get
1812− return (PRunTactics x1 x2)
1812+ return (PRunElab x1 x2)
18131813 40 -> do x1 <- get
18141814 x2 <- get
18151815 x3 <- get
src/Idris/IdrisDoc.hs+1−1
@@ -321,7 +321,7 @@ extractPTermNames (PCoerced p) = extract p
321321extractPTermNames (PDisamb _ p) = extract p
322322extractPTermNames (PUnifyLog p) = extract p
323323extractPTermNames (PNoImplicits p) = extract p
324−extractPTermNames (PRunTactics _ p) = extract p
324+extractPTermNames (PRunElab _ p) = extract p
325325extractPTermNames _ = []
326326
327327-- | Shorter name for extractPTermNames
src/Idris/ParseExpr.hs+9−9
@@ -221,7 +221,7 @@ InternalExpr ::=
221221internalExpr :: SyntaxInfo -> IdrisParser PTerm
222222internalExpr syn =
223223 unifyLog syn
224− <|> runTactics syn
224+ <|> runElab syn
225225 <|> disamb syn
226226 <|> noImplicits syn
227227 <|> recordType syn
@@ -498,16 +498,16 @@ unifyLog syn = do try (lchar '%' *> reserved "unifyLog")
498498
499499{- | Parses a new-style tactics expression
500500RunTactics ::=
501− '%' 'runTactics' SimpleExpr
501+ '%' 'runElab' SimpleExpr
502502 ;
503503-}
504−runTactics :: SyntaxInfo -> IdrisParser PTerm
505−runTactics syn = do try (lchar '%' *> reserved "runTactics")
506− fc <- getFC
507− tm <- simpleExpr syn
508− i <- get
509− return $ PRunTactics fc tm
510− <?> "new-style tactics expression"
504+runElab :: SyntaxInfo -> IdrisParser PTerm
505+runElab syn = do try (lchar '%' *> reserved "runElab")
506+ fc <- getFC
507+ tm <- simpleExpr syn
508+ i <- get
509+ return $ PRunElab fc tm
510+ <?> "new-style tactics expression"
511511
512512{- | Parses a disambiguation expression
513513Disamb ::=
test/tactics001/Tactics.idr+4−4
@@ -1,6 +1,6 @@
11module Tactics
22
3−import Language.Reflection.Tactical
3+import Language.Reflection.Elab
44
55import Data.Vect
66
@@ -18,21 +18,21 @@ refl t x = RApp (RApp (Var (UN "Refl")) t) x
1818plusZeroRightNeutralNew : (n : Nat) -> plus n 0 = n
1919plusZeroRightNeutralNew Z = Refl
2020plusZeroRightNeutralNew (S k) =
21− %runTactics (do rewriteWith `(sym $ plusZeroRightNeutralNew ~(Var "k"))
21+ %runElab (do rewriteWith `(sym $ plusZeroRightNeutralNew ~(Var "k"))
2222 fill $ refl `(Nat : Type) `(S ~(Var (UN "k")))
2323 solve)
2424
2525plusSuccRightSuccNew : (j, k : Nat) -> plus j (S k) = S (plus j k)
2626plusSuccRightSuccNew Z k = Refl
2727plusSuccRightSuccNew (S j) k =
28− %runTactics (do rewriteWith `(sym $ plusSuccRightSuccNew ~(Var "j") ~(Var (UN "k")))
28+ %runElab (do rewriteWith `(sym $ plusSuccRightSuccNew ~(Var "j") ~(Var (UN "k")))
2929 fill $ refl `(Nat : Type) `(S (S (plus ~(Var (UN "j")) ~(Var (UN "k")))))
3030 solve)
3131
3232-- Test that side effects in new tactics work
3333
3434mkDecl : ()
35−mkDecl = %runTactics (do declareType $ Declare (NS (UN "repUnit") ["Tactics"])
35+mkDecl = %runElab (do declareType $ Declare (NS (UN "repUnit") ["Tactics"])
3636 [Implicit (UN "z") `(Nat)]
3737 `(Vect ~(Var (UN "z")) ())
3838 fill `(() : ())