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
import Network.HTTP | |
import Codec.Binary.UTF8.String | |
queryString :: String | |
queryString = "ひとし+君" | |
queryRPP :: Int | |
queryRPP = 10 | |
makeRequestUrl :: String |
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
import System.IO (hPutStrLn, stderr) | |
import Control.Exception (catch, IOException, SomeException) | |
import Prelude hiding (catch) | |
readFileWithDefault :: FilePath -> String -> IO String | |
readFileWithDefault filepath defaultString = | |
catch | |
(readFile filepath) | |
(\e -> do | |
return (e::SomeException) |
NewerOlder