Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import qualified Data.ByteString.Char8 as B
- import qualified Data.ByteString.Lazy.Char8 as L
- class PackChar8 s where
- pack :: String -> s
- unpack :: s -> String
- instance PackChar8 B.ByteString where
- pack = B.pack
- unpack = B.unpack
- instance PackChar8 L.ByteString where
- pack = L.pack
- unpack = L.unpack
- id :: (PackChar8 p) => p -> p
- id = pack . unpack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement