@@ -115,11 +115,17 @@ elabDocTerms info str = do typechecked <- Traversable.mapM decorate str
115 else Checked tm
115 else Checked tm
116 | otherwise = Unchecked
116 | otherwise = Unchecked
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
118elabExec :: FC -> PTerm -> PTerm
120elabExec :: FC -> PTerm -> PTerm
119elabExec fc tm = runtm (PAlternative False
121elabExec fc tm = runtm (PAlternative False
120− [PApp fc (PRef fc (sUN "printLn"))
122+ [printtm (PApp fc (PRef fc (sUN "the"))
121− [pimp (sUN "ffi") (PRef fc (sUN "FFI_C")) False, pexp tm],
123+ [pexp (PConstant (AType (ATInt ITBig))), pexp tm]),
124 runtm t = PApp fc (PRef fc (sUN "run__IO")) [pexp t]
128 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]