on master help sign in
Minor cleanup and better comment and Haddock
29cbd12David Christiansen
src/Core/Execute.hs+3
@@ -22,6 +22,9 @@ import Foreign.Marshal.Alloc (free)
22-- | Attempt to perform a side effect. Return either Just the next step in
22-- | Attempt to perform a side effect. Return either Just the next step in
23-- evaluation (after performing the side effect through IO), or Nothing if no
23-- evaluation (after performing the side effect through IO), or Nothing if no
24-- IO was performed.
24-- IO was performed.
25+--
26+-- This function is exceedingly generous about what it will accept in order to
27+-- enable convenient testing at the REPL.
25step :: TT Name -> Idris (Maybe (TT Name))
28step :: TT Name -> Idris (Maybe (TT Name))
26step tm = step' (unApply tm)
29step tm = step' (unApply tm)
27 where step' (P _ (UN "unsafePerformIO") _, [_, arg] ) = step arg -- Only step if arg can be stepped
30 where step' (P _ (UN "unsafePerformIO") _, [_, arg] ) = step arg -- Only step if arg can be stepped