In ghci with the same steps I get:
λ> bar
hello
Just 500
but with pulp repl I get this instead:
> bar
'hi'
'hello'
(Just 500)
Full session:
> import Debug.Trace (traceM)
> import Data.Maybe
> :paste
… foo :: Maybe Int
… foo = do
… traceM "hi"
… Just 5
…
> foo
'hi'
(Just 5)
> :paste
… bar :: Maybe Int
… bar = do
… traceM "hello"
… Just 500
…
> bar
'hi'
'hello'
(Just 500)