fork download
  1. main = print $ foldl (:) [] "abcd"
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:1:21:
    Occurs check: cannot construct the infinite type: a = [a]
      Expected type: a -> [a] -> a
      Inferred type: a -> [a] -> [a]
    In the first argument of `foldl', namely `(:)'
    In the second argument of `($)', namely `foldl (:) [] "abcd"'
stdout
Standard output is empty