#3302: Where-clause environments for GHCi
------------------------------+---------------------------------------------
 Reporter:  cjs               |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Milestone:                  
Component:  GHCi              |        Version:  6.10.3          
 Severity:  normal            |     Resolution:                  
 Keywords:                    |       Testcase:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by dherington):

 It seems what you want is already provided (unless I misunderstand):

 bash-3.2$ cat Test.hs
 top :: Int -> Int
 top x = mult 4 - mult 3 + mult 2
     where
         mult n = x * n
 bash-3.2$ ghci Test.hs
 GHCi, version 6.10.3: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer ... linking ... done.
 Loading package base ... linking ... done.
 [1 of 1] Compiling Main             ( Test.hs, interpreted )
 Ok, modules loaded: Main.
 *Main> :step top 2
 Stopped at Test.hs:(2,0)-(4,21)
 _result :: Int = _
 [Test.hs:(2,0)-(4,21)] *Main> :step
 Stopped at Test.hs:2:8-31
 _result :: Int = _
 mult :: Int -> Int = _
 [Test.hs:2:8-31] *Main> mult 4
 8
 [Test.hs:2:8-31] *Main>

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3302#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to