on master help sign in
Cosmetic tweak in interactive editing
commitd66da2157639719ea8953436a8967810d83d7201 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 5 Dec 2013, 18:12 (13 years ago) parent2f52264
4 files changed+4
libs/prelude/Decidable/Equality.idr+1 src/Idris/CaseSplit.hs+1 src/Idris/ElabDecls.hs+1 src/Idris/REPL.hs+1
libs/prelude/Decidable/Equality.idr+1
@@ -1,6 +1,7 @@
11module Decidable.Equality
22
33import Builtins
4+import Prelude.Basics
45import Prelude.Either
56import Prelude.List
67import Prelude.Vect
src/Idris/CaseSplit.hs+1
@@ -326,6 +326,7 @@ getClause l fn fp = do ty <- getInternalApp fp l
326326 getNameFrom i used (PPi _ _ _ _)
327327 = uniqueNameFrom (mkSupply [UN "f", UN "g"]) used
328328 getNameFrom i used (PApp fc f as) = getNameFrom i used f
329+ getNameFrom i used (PEq _ _ _) = uniqueNameFrom [UN "prf"] used
329330 getNameFrom i used (PRef fc f)
330331 = case getNameHints i f of
331332 [] -> uniqueName (UN "x") used
src/Idris/ElabDecls.hs+1
@@ -511,6 +511,7 @@ elabPrims = do mapM_ (elabDecl EAll toplevel)
511511 (zip
512512 [inferOpts, unitOpts, falseOpts, pairOpts, eqOpts]
513513 [inferDecl, unitDecl, falseDecl, pairDecl, eqDecl]))
514+ addNameHint eqTy (UN "prf")
514515 elabDecl EAll toplevel elimDecl
515516 mapM_ elabPrim primitives
516517 -- Special case prim__believe_me because it doesn't work on just constants
src/Idris/REPL.hs+1
@@ -741,6 +741,7 @@ process h fn (DoProofSearch updatefile l n hints)
741741 updateMeta brack [] n new = ""
742742
743743 addBracket False new = new
744+ addBracket True new@('(':xs) | last xs == ')' = new
744745 addBracket True new | any isSpace new = '(' : new ++ ")"
745746 | otherwise = new
746747