Skip to content

Instantly share code, notes, and snippets.

@raimohanska
Created November 8, 2011 08:29
Show Gist options
  • Save raimohanska/1347290 to your computer and use it in GitHub Desktop.
Save raimohanska/1347290 to your computer and use it in GitHub Desktop.
Haskell Data.ByteString <-> String conversion helper
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