Result

WA

Duration

1020ms

Code [DL]

m s|s!!1==s!!2=s!!2|True=s!!4
main=getContents>>=putChar.m.lines

stdin

639 192
533 739
423 676
671 147
816 165
388 884
255 595
211 342
581 335
977 772
244 776
799 292
298 191
417 773
163 964
638 338
317 716
378 881
792 763
989 895
885 862
388 535
644 499
232 258
594 887
883 246
118 686
528 224
511 886
876 754
767 766
294 167

stdout

stderr

/volume/CODE:2:28: error:
    • Couldn't match type ‘[Char]’ with ‘Char’
      Expected type: String -> Char
        Actual type: String -> String
    • In the second argument of ‘(.)’, namely ‘m . lines’
      In the second argument of ‘(>>=)’, namely ‘putChar . m . lines’
      In the expression: getContents >>= putChar . m . lines
  |
2 | main=getContents>>=putChar.m.lines
  |                            ^^^^^^^

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffec2ed0e50 /* 7 vars */) = 0
12    execve("/usr/bin/runghc", ["/usr/bin/runghc", "/volume/CODE"], 0x55e3b7617d40 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55e3b7617d30 /* 7 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    execve("/usr/lib/ghc-8.8.3/bin/runghc", ["/usr/lib/ghc-8.8.3/bin/runghc", "-f", "/usr/bin/ghc-8.8.3", "/volume/CODE"], 0x55fe1f3a0168 /* 7 vars */) = 0
12    execve("/usr/bin/ghc-8.8.3", ["/usr/bin/ghc-8.8.3", "-ignore-dot-ghci", "-x", "hs", "-e", ":set prog \"/volume/CODE\"", "-e", ":main []", "/volume/CODE"], 0x7ffff9f67920 /* 7 vars */) = 0
12    execve("/usr/lib/ghc-8.8.3/bin/ghc", ["/usr/lib/ghc-8.8.3/bin/ghc", "-B/usr/lib/ghc-8.8.3", "-ignore-dot-ghci", "-x", "hs", "-e", ":set prog \"/volume/CODE\"", "-e", ":main []", "/volume/CODE"], 0x5651584ab200 /* 7 vars */) = 0
17    execve("/bin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7ffd3f0443a0 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/local/sbin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7ffd3f0443a0 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/local/bin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7ffd3f0443a0 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/sbin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7ffd3f0443a0 /* 7 vars */) = -1 ENOENT (No such file or directory)
17    execve("/usr/bin/gcc", ["gcc", "-DTABLES_NEXT_TO_CODE", "-B/usr/lib/ghc-8.8.3/integer-gmp"..., "--print-file-name", "libgmp.so"], 0x7ffd3f0443a0 /* 7 vars */) = 0
17    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    +++ exited with 0 +++
16    +++ exited with 0 +++
15    +++ exited with 0 +++
13    +++ exited with 0 +++
12    +++ exited with 1 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=1, si_utime=15, si_stime=3} ---
10    +++ exited with 1 +++