@@ -123,13 +123,16 @@ elabDocTerms info str = do typechecked <- Traversable.mapM decorate str
123123 else Checked tm
124124 | otherwise = Unchecked
125125
126−-- | Try running the term directly (as IO ()), then printing it as an Integer
127−-- (as a default numeric tye), then printing it as any Showable thing
126+-- | Try running the term directly (as IO ()) or with >>= printLn appended
127+-- (for other IO _), then printing it as an Integer (as a default numeric
128+-- type), then printing it as any Showable thing
128129elabExec :: FC -> PTerm -> PTerm
129130elabExec fc tm = runtm (PAlternative [] FirstSuccess
130131 [printtm (PApp fc (PRef fc [] (sUN "the"))
131132 [pexp (PConstant NoFC (AType (ATInt ITBig))), pexp tm]),
132133 tm,
134+ PApp fc (PRef fc [] (sUN ">>="))
135+ [pexp tm, pexp (PRef fc [] (sUN "printLn"))],
133136 printtm tm
134137 ])
135138 where