where
import Control.Concurrent.ParallelIO (parallel)
-import qualified Data.Map as Map (lookup)
import Data.Time (getCurrentTime)
import qualified Data.ByteString.Lazy as B (ByteString, hPut)
import Data.String.Utils (split, strip)
-import qualified Data.Map as Map (Map, empty, insert)
+import qualified Data.Map as Map (Map, empty, insert, lookup)
import Data.Maybe (catMaybes, fromJust, isNothing)
import Prelude hiding (readFile)
import System.IO (Handle, hClose, hFlush)
-make_absolute_uri :: URI -> Maybe URI
+make_absolute_uri :: URI -> URI
make_absolute_uri relative_uri =
relativeTo relative_uri base_uri
where
case parse_result of
Nothing -> Nothing
Just relative_uri ->
- let abs_result = make_absolute_uri relative_uri in
- case abs_result of
- Nothing -> Nothing
- Just abs_uri -> Just $ show abs_uri
+ Just $ show $ make_absolute_uri relative_uri
where
parse_result = parseURIReference relative_url