Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

Haskell

Compiler

ghc 8.4.2

Options
Warnings

Author

anonymous

over 5 years ago

$ ghc prog.hs -o prog.exe -Wall
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:8:14: error:
    • No instance for (Fractional Int) arising from a use of ‘/’
    • In the second argument of ‘($)’, namely ‘(a / b :: Int)’
      In a stmt of a 'do' block: print $ (a / b :: Int)
      In the expression:
        do let a = ...
               b = ...
           print $ (a / b :: Int)
  |
8 |     print $ (a / b :: Int)    -- 単に print $ a / b でも同様のエラーを吐く
  |              ^^^^^
Exit Code:
1