/ Vijos /

记录详情

Compile Error

[1 of 1] Compiling Main             ( /in/foo.hs, /tmp/Main.o )

/in/foo.hs:15:21: error:
    Variable not in scope: putIntLn :: Int -> IO ()

/in/foo.hs:17:5: error:
    Variable not in scope: putIntLn :: Int -> Maybe b

/in/foo.hs:17:5: error:
    * Couldn't match type `Maybe' with `IO'
      Expected type: IO b
        Actual type: Maybe b
    * In a stmt of a 'do' block: putIntLn =<< caluclate
      In the expression:
        do { case caluclate of {
               Just res -> putIntLn res
               Nothing -> putStrLn "Nothing" };
             putIntLn =<< caluclate }
      In an equation for `main':
          main
            = do { case caluclate of {
                     Just res -> putIntLn res
                     Nothing -> putStrLn "Nothing" };
                   putIntLn =<< caluclate }

信息

递交者
类型
自测
题目
P1000 A+B Problem
语言
Haskell
递交时间
2020-08-24 17:15:40
评测时间
2020-08-24 17:15:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes