Why does PureScript traceM print strings from previous values?

Viewed 43

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)
0 Answers
Related