diff options
Diffstat (limited to 'src/Page.hs')
-rw-r--r-- | src/Page.hs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/Page.hs b/src/Page.hs deleted file mode 100644 index 8a8ebea..0000000 --- a/src/Page.hs +++ /dev/null @@ -1,22 +0,0 @@ -module Page - ( get - ) where - -import Control.Exception (SomeException, try) - -import Data.Text (Text) -import qualified Data.Text as T -import Data.Text.Encoding as T -import Data.ByteString.Lazy as BS - -import Network.HTTP.Conduit - -import Model.URL - -import Utils.Either (mapLeft) - -get :: URL -> IO (Either Text Text) -get url = mapLeft (T.pack . show) <$> (try (unsafeGetPage url) :: IO (Either SomeException Text)) - -unsafeGetPage :: URL -> IO Text -unsafeGetPage url = (T.decodeLatin1 . BS.toStrict) <$> simpleHttp (T.unpack url) |