[Haskell-beginners] string -> bytestring

Christopher Howard christopher.howard at frigidcode.com
Tue Jan 1 11:53:44 CET 2013


Hi. I'm trying to use pcre-light in a small text-manip app. However, the
module seems to want the incoming text data as a ByteString, whereas I
in my child-like naivety am taking the data from stdin as Strings. After
searching around, I tried using the fromString function from
Data.ByteString.UTF8 to convert from String to ByteString; but all I get is:

code:
--------
Couldn't match expected type `ByteString'
with actual type `bytestring-0.9.2.1:Data.ByteString.Internal.ByteString'
--------

So I'm not sure what to do.

-- 
frigidcode.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130101/e7c5c515/attachment.pgp>


More information about the Beginners mailing list