#4316: Interactive "do" notation in GHCi
---------------------------------+------------------------------------------
Reporter: mitar | Owner:
Type: feature request | Status: new
Priority: normal | Component: GHCi
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by vivian):
As far as I know, it is possible to "run commands under StateT monad based
on IO."
I am interested in the "supporting interactive 'do' notation" and have
changed the ticket name accordingly.
Instead of displaying "Empty 'do' construct", GHCi could provide a prompt
for further input, with the prompt being the type of the 'do' monad. A
blank lines signals the end of input and the entire interaction is then
re-interpreted. It should be possible to nest multiple 'do's.
{{{
Prelude> flip evalStateT 1 $ do
StateT Int IO a | i <- get
StateT Int IO a | putStrLn $ show i
StateT Int IO a | return $ i + 1
StateT Int IO a |
1
2
Prelude>
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4316#comment:2>
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