As the title says, for some reason, messages passed to the trace
(well, a variant of which) function don't show up properly when debugging functions. Simply flushing stdout/stderr doesn't seem to do anything, either.
-- Makes it more like Haskell's trace
debug :: String -> α -> α
debug msg f = const f $ trace msg
-- dummy function
polyA :: (Num α) => α
polyA = debug "polyA\n" 0
-- another dummy function
polyB :: (Num α) => α
polyB = debug "polyB\n" polyA
main :: IO ()
main = do println (polyB :: Int )
println (polyB :: Int )
println (polyB :: Integer)
Output is just
0
0
with nothing visible in stderr (normally represented by red text in Eclipse's console).