@@ -115,11 +115,17 @@ elabDocTerms info str = do typechecked <- Traversable.mapM decorate str
115115 else Checked tm
116116 | otherwise = Unchecked
117117
118+-- Try running the term directly (as IO ()), then printing it as an Integer
119+-- (as a default numeric tye), then printing it as any Showable thing
118120elabExec :: FC -> PTerm -> PTerm
119121elabExec fc tm = runtm (PAlternative False
120− [PApp fc (PRef fc (sUN "printLn"))
121− [pimp (sUN "ffi") (PRef fc (sUN "FFI_C")) False, pexp tm],
122− tm])
122+ [printtm (PApp fc (PRef fc (sUN "the"))
123+ [pexp (PConstant (AType (ATInt ITBig))), pexp tm]),
124+ tm,
125+ printtm tm
126+ ])
123127 where
124128 runtm t = PApp fc (PRef fc (sUN "run__IO")) [pexp t]
129+ printtm t = PApp fc (PRef fc (sUN "printLn"))
130+ [pimp (sUN "ffi") (PRef fc (sUN "FFI_C")) False, pexp t]
125131