Created
November 8, 2011 08:29
-
-
Save raimohanska/1347290 to your computer and use it in GitHub Desktop.
Haskell Data.ByteString <-> String conversion helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ByteStringHelper where | |
import Data.ByteString as B | |
import Data.String | |
unpack :: B.ByteString -> String | |
unpack = read . show | |
pack :: String -> B.ByteString | |
pack = read . show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment