parseHost :: URI -> String
parseHost target = case parseURI target of
  Just u -> fromMaybe
            (error $ "Couldn't parse hostname "++ "from "++target)
            (uriRegName u)
  Nothing -> error $ "Couldn't parse URI "++target
parseHost :: URI -> String
parseHost target = case parseURI target of
  Just u -> fromMaybe
            (error $ "Couldn't parse hostname "++ "from "++target)
            (uriRegName u)
  Nothing -> error $ "Couldn't parse URI "++target
parseHost target = case parseURI target of
  Just u -> fromMaybe
            (error $ "Couldn't parse hostname "++ "from "++target)
            (uriRegName u)
  Nothing -> error $ "Couldn't parse URI "++target