main :: IO ()
main = do
let a = ("teeeeeeeeeeeeest","teeeeeeeeeeeest")
b <- app a
print b
app expects (bytestring,bytestring) not ([char],[char])
how can I convert it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can convert
Strings toByteStrings withData.ByteString.Char8.pack(or the lazyByteStringversion thereof) if yourStringcontains only ASCII values or you are interested only in the last eight bits of eachChar,If your
Stringcontains non-ASCIIChars and you are interested in more than only the last eight bits, you will need some other encoding, likeData.ByteString.UTF8.fromString.