on master help sign in
"it" now refers to the previous value at the REPL
commit506d36729b3af84fb07fe843eadb109cb31eb82d authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 1 Aug 2013, 12:08 (13 years ago) parenta76627e
2 files changed+7
CHANGELOG+5 src/Idris/REPL.hs+2
CHANGELOG+5
@@ -1,3 +1,8 @@
1+New in 0.9.10:
2+--------------
3+
4+* At the REPL, "it" now refers to the previous expression
5+
16New in 0.9.9:
27-------------
38
src/Idris/REPL.hs+2
@@ -300,6 +300,8 @@ process fn (Eval t)
300300 ist <- getIState
301301 let tm' = normaliseAll ctxt [] tm
302302 let ty' = normaliseAll ctxt [] ty
303+ -- Add value to context, call it "it"
304+ updateContext (addCtxtDef (UN "it") (Function ty' tm'))
303305 logLvl 3 $ "Raw: " ++ show (tm', ty')
304306 imp <- impShow
305307 iResult (showImp imp (delab ist tm') ++ " : " ++