added how to make bytestring to string example
This commit is contained in:
parent
77f105b0c6
commit
206d0990c9
1 changed files with 12 additions and 0 deletions
12
browser.hs
12
browser.hs
|
@ -20,3 +20,15 @@ getTweet url = do
|
|||
case body of
|
||||
empty -> return Nothing
|
||||
_ -> return Just (L.unpack body)
|
||||
|
||||
|
||||
module Main where
|
||||
|
||||
import qualified Data.ByteString as BS
|
||||
import Data.Char
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
bs <- BS.readFile "haskelltest.hs"
|
||||
let w8 = BS.unpack bs
|
||||
putStrLn $ map (chr . fromIntegral) w8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue