fork download
  1. import Data.Typeable
  2. main = do
  3. let x = 42
  4. putStr(typeOf x)
  5.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:4:10:
    Couldn't match expected type `String'
           against inferred type `TypeRep'
    In the first argument of `putStr', namely `(typeOf x)'
    In the expression: putStr (typeOf x)
    In the expression:
        do let x = 42
           putStr (typeOf x)
stdout
Standard output is empty