#3302: Where-clause environments for GHCi
-----------------------------+----------------------------------------------
Reporter:  cjs               |          Owner:                  
    Type:  feature request   |         Status:  new             
Priority:  normal            |      Component:  GHCi            
 Version:  6.10.3            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 Often in ghci I'd like to interactively debug and play with functions in
 the `where` clause of a top-level definition. Currently, this requires one
 to change the code, lifting the definitions in question to the top level
 and adding appropriate parameters.

 Given a definition such as
 {{{
 top :: Int -> Int
 top x = mult 4 - mult 3 + mult 2
     where
         mult n = x * n
 }}}
 it would be nice to type something such as `:environment top 2` to put me
 in an envrionment where `mult` is available and `mult 4` will evaluate to
 `8`. (Obviously this becomes more useful with more complex definitions.)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3302>
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