[Haskell-cafe] Re: ANNOUNCE: torch-0.1

Yusaku Hashimoto nonowarn at gmail.com
Tue Mar 10 12:49:33 EDT 2009


On Wed, Mar 11, 2009 at 1:06 AM, Yusaku Hashimoto <nonowarn at gmail.com> wrote:
>> 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 :)"


More information about the Haskell-Cafe mailing list