errorIndexUrl :: Doc
errorIndexUrl = version_url <> "error-index.html"
  where
    version = Paths_futhark.version
    base_url = "https://futhark.readthedocs.io/en/"
    version_url
      | last (Version.versionBranch version) == 0 = base_url <> "latest/"
      | otherwise = base_url <> "v" <> text (Version.showVersion version) <> "/"

-- | Attach a reference to documentation explaining the error in more detail.
errorIndexUrl :: Doc
errorIndexUrl = version_url <> "error-index.html"
  where
    version = Paths_futhark.version
    base_url = "https://futhark.readthedocs.io/en/"
    version_url
      | last (Version.versionBranch version) == 0 = base_url <> "latest/"
      | otherwise = base_url <> "v" <> text (Version.showVersion version) <> "/"

-- | Attach a reference to documentation explaining the error in more detail.
errorIndexUrl = version_url <> "error-index.html"
  where
    version = Paths_futhark.version
    base_url = "https://futhark.readthedocs.io/en/"
    version_url
      | last (Version.versionBranch version) == 0 = base_url <> "latest/"
      | otherwise = base_url <> "v" <> text (Version.showVersion version) <> "/"

-- | Attach a reference to documentation explaining the error in more detail.