fork download
  1. {-# LANGUAGE OverloadedStrings #-}
  2.  
  3. import qualified Data.ByteString as BS
  4.  
  5. main = print $ BS.breakByte 'c' "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:5:29:
    Couldn't match expected type `GHC.Word.Word8'
                with actual type `Char'
    In the first argument of `BS.breakByte', namely 'c'
    In the second argument of `($)', namely `BS.breakByte 'c' "abcd"'
    In the expression: print $ BS.breakByte 'c' "abcd"
stdout
Standard output is empty