getEnvironmentURI :: String -> IO URI
getEnvironmentURI key = do
  uri <- lookupEnv key >>= maybe (fail $ key ++ " is missing from environment") return
  maybe (fail $ uri ++ " is an invalid uri") return $ parseURI uri
getEnvironmentURI :: String -> IO URI
getEnvironmentURI key = do
  uri <- lookupEnv key >>= maybe (fail $ key ++ " is missing from environment") return
  maybe (fail $ uri ++ " is an invalid uri") return $ parseURI uri
getEnvironmentURI key = do
  uri <- lookupEnv key >>= maybe (fail $ key ++ " is missing from environment") return
  maybe (fail $ uri ++ " is an invalid uri") return $ parseURI uri