
10 Mar
2009
10 Mar
'09
12:49 p.m.
On Wed, Mar 11, 2009 at 1:06 AM, Yusaku Hashimoto
import Test.Torch
main = run $ do ok (odd 1) "assertion" is 42 (7*6) "equality assertion" isBottom (error undefined) "check whether value is bottom" ans <- liftIO (putStr "\n5 + 7 = " >> readLn) is ans 12 "sanity check :)"
Sorry, Above code doesn't work. I fixed this. But this code still don't work as I expected in output order: import Test.Torch import Control.Monad.Trans (liftIO) import System.IO main = run $ do liftIO $ hSetBuffering stdout NoBuffering ok (odd 1) "assertion" is 42 (7*6) "equality assertion" isBottom (undefined::Int) "check whether value is bottom" ans <- liftIO (putStr "\n5 + 7 = " >> readLn) is ans 12 "sanity check :)"