#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 mitar):
Replying to [comment:2 vivian]:
> I am interested in the "supporting interactive 'do' notation" and have
changed the ticket name accordingly.
Great.
> A blank lines signals the end of input and the entire interaction is
then re-interpreted.
Wouldn't it be better if things would be interpreted immediately?
Like:
{{{
Prelude> flip evalStateT 1 $ do
StateT Int IO a | i <- get
StateT Int IO a | liftIO $ putStrLn $ show i
1
StateT Int IO a | return $ i + 1
StateT Int IO a |
2
Prelude>
}}}
Similar to the IO monad behavior:
{{{
Prelude> i <- return 1
Prelude> putStrLn $ show i
1
Prelude> return $ i + 1
2
}}}
And I am not exactly sure empty line would be then necessary as things
would be evaluated by line anyway and once there would be
return/fail/throw evaluation would stop.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4316#comment:3>
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