Make GHCi print the entire result of an interactive 'bind' statement
foo :: Int -> IO (Maybe Int, Bool)
Then here's a GHCi interaction:
Prelude> foo 3 (Just 3,True) -- Entire result printed Prelude> (Just x, _) <- foo 3 3 -- Value of x printed Prelude> (Just x, y) <- foo 3 -- Nothing at all printed Prelude> (_, _) <- foo 3 -- Nothing at all printed Prelude>
GHCi prints the result of a bind,
p <- e, if and only if the pattern
p binds exactly one variable. This is a bit odd; you get no info if it binds more than one.
A different and simpler behaviour would be to print the entire result every time. That is, all the commands above would print
(Just 3, True).
I'm recording this ticket so that we remember the suggestion. I don't know for sure if it's a good one. Add comments if you have an opinion