on master help sign in
Merge pull request #2828 from david-christiansen/pruviloj

Improve code style in Pruviloj

commitda70923fd0e02799957ceeafd6477557d98f8c44 authorDavid Christiansen <david@davidchristiansen.dk> dateFri 27 Nov 2015, 18:07 (11 years ago) parentb4abe25e127f57
2 files changed+3−5
libs/pruviloj/Pruviloj/Core.idr+2−2 libs/pruviloj/Pruviloj/Derive/DecEq.idr+1−3
libs/pruviloj/Pruviloj/Core.idr+2−2
@@ -91,7 +91,7 @@ newHole hint ty =
9191|||
9292||| @ tm the term that has the right type for the hole
9393exact : (tm : Raw) -> Elab ()
94−exact tm = do apply tm []
94+exact tm = do fill tm
9595 solve
9696
9797||| Introduce as many names as possible, returning them.
@@ -178,7 +178,7 @@ data Infer : Type where
178178total
179179inferType : (tac : Elab ()) -> Elab (TT, TT)
180180inferType tac =
181− case fst !(runElab `(Infer) (startInfer *> tac)) of
181+ case fst !(runElab `(Infer) (do startInfer; tac)) of
182182 `(MkInfer ~ty ~tm) => return (tm, ty)
183183 _ => fail [TextPart "Not infer"]
184184 where
libs/pruviloj/Pruviloj/Derive/DecEq.idr+1−3
@@ -44,9 +44,7 @@ partial -- TODO make covering/total
4444matchCase : List Raw -> Elab ()
4545matchCase [] = search
4646matchCase (tm :: tms) =
47− do hs <- induction tm
48− y <- unsafeNth 0 hs
49− n <- unsafeNth 1 hs
47+ do (y :: n :: _) <- induction tm
5048
5149 focus n; compute
5250 contra <- gensym "contra"