Fix a build failure

Pinging @DanBurton @chrisdone
This commit is contained in:
Michael Snoyman 2015-03-19 13:45:32 +02:00
parent 706a977e19
commit ec57908a63

View File

@ -130,23 +130,23 @@ getStackageCabalConfigR slug = do
headerGlobal render = yield $ Chunk $
toBuilder (asText "-- Stackage snapshot from: ") ++
toBuilder snapshotUrl ++
toBuilder (snapshotUrl render) ++
toBuilder (asText "\n-- Please place these contents in your global cabal config file.\n-- To only use tested packages, uncomment the following line\n-- and comment out other remote-repo lines:\n-- remote-repo: stackage-") ++
toBuilder (toPathPiece slug) ++
toBuilder ':' ++
toBuilder snapshotUrl ++
toBuilder (snapshotUrl render) ++
toBuilder '\n'
headerLocal render = yield $ Chunk $
toBuilder (asText "-- Stackage snapshot from: ") ++
toBuilder snapshotUrl ++
toBuilder (snapshotUrl render) ++
toBuilder (asText "\n-- Please place this file next to your .cabal file as cabal.config\n-- To only use tested packages, uncomment the following line:\n-- remote-repo: stackage-") ++
toBuilder (toPathPiece slug) ++
toBuilder ':' ++
toBuilder snapshotUrl ++
toBuilder (snapshotUrl render) ++
toBuilder '\n'
snapshotUrl = asHttp $ render $ SnapshotR slug StackageHomeR
snapshotUrl render = asHttp $ render $ SnapshotR slug StackageHomeR
asHttp (stripPrefix "http://" -> Just s) = "http://" <> s
asHttp (stripPrefix "https://" -> Just s) = "http://" <> s