[GHC] #13037: educational purpose 2

GHC ghc-devs at haskell.org
Sun Dec 25 14:38:20 UTC 2016


#13037: educational purpose 2
-------------------------------------+-------------------------------------
           Reporter:  vanto          |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The goal is to have, in GHCi, the interim results provided by the function
 before the end result by a command available from the prompt, like
 this: for example:[[BR]]

 Prelude> g op n [] = n ; g op n (h:t) = h `op` g op n t[[BR]]

 Prelude> :stp[[BR]]

 Prelude> g (*) 2 [1..3][[BR]]

 1* (*) 2 [2,3][[BR]]

 1*2 (*) 2 [3][[BR]]

 1*2*3 (*) 2 [][[BR]]

 1*2*3*2[[BR]]

 12[[BR]]

 Prelude>[[BR]]

 And to quit the mode we write from the prompt a command like this[[BR]]

 Prelude> :quitstp

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13037>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list