{-# LANGUAGE QuasiQuotes #-}{-|Module : GHCup.Hardcoded.URLsDescription : URLs used by GHCup at runtimeCopyright : (c) Julian Ospald, 2020License : LGPL-3.0Maintainer : hasufell@hasufell.deStability : experimentalPortability : portable-}module GHCup.Hardcoded.URLs whereimport GHCup.Typesimport URI.ByteStringimport URI.ByteString.QQimport qualified Data.Text as T-- | This reflects the API version of the YAML.---- Note that when updating this, CI requires that the file exists AND the same file exists at-- 'https://www.haskell.org/ghcup/exp/ghcup-<ver>.yaml' with some newlines added.-- TODO: revert to masterghcupURL :: URIghcupURL = [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.1.0.yaml|]stackSetupURL :: URIstackSetupURL = [uri|https://raw.githubusercontent.com/commercialhaskell/stackage-content/master/stack/stack-setup-2.yaml|]shimGenURL :: URIshimGenURL = [uri|https://downloads.haskell.org/~ghcup/shimgen/shim-2.exe|]shimGenSHA :: T.TextshimGenSHA = T.pack "7c55e201f71860c5babea886007c8fa44b861abf50d1c07e5677eb0bda387a70"channelURL :: ChannelAlias -> URIchannelURL = \case DefaultChannel -> ghcupURL StackChannel -> stackSetupURL CrossChannel -> [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-cross-0.1.0.yaml|] PrereleasesChannel -> [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.1.0.yaml|] VanillaChannel -> [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.1.0.yaml|] ThirdPartyChannel -> [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-3rdparty-0.1.0.yaml|]