Skip to content

Commit 376b5c7

Browse files
snoybergborsboom
authored andcommitted
Fix warnings
1 parent 5cd64a6 commit 376b5c7

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

src/Stack/Config.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import Distribution.System (OS (..), Platform (..), buildPlatform, Arc
5151
import qualified Distribution.Text
5252
import Distribution.Version (simplifyVersionRange, mkVersion')
5353
import GHC.Conc (getNumProcessors)
54-
import Lens.Micro ((.~))
5554
import Network.HTTP.StackClient (httpJSON, parseUrlThrow, getResponseBody)
5655
import Options.Applicative (Parser, help, long, metavar, strOption)
5756
import Path

src/Stack/Docker.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ reset keepHome = do
450450
-- a container, such as switching the UID/GID to the "outside-Docker" user's.
451451
entrypoint :: (HasProcessContext env, HasLogFunc env)
452452
=> Config -> DockerEntrypoint -> RIO env ()
453-
entrypoint config@Config{..} DockerEntrypoint{..} =
453+
entrypoint config@Config{} DockerEntrypoint{..} =
454454
modifyMVar_ entrypointMVar $ \alreadyRan -> do
455455
-- Only run the entrypoint once
456456
unless alreadyRan $ do

src/Stack/Setup.hs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,23 +1115,19 @@ downloadAndInstallCompiler :: (HasBuildConfig env, HasGHCVariant env)
11151115
-> VersionCheck
11161116
-> Maybe String
11171117
-> RIO env Tool
1118-
downloadAndInstallCompiler ghcBuild si wanted@WCGhc{} versionCheck mbindistURL = do
1118+
downloadAndInstallCompiler ghcBuild si wanted@(WCGhc version) versionCheck mbindistURL = do
11191119
ghcVariant <- view ghcVariantL
11201120
(selectedVersion, downloadInfo) <- case mbindistURL of
11211121
Just bindistURL -> do
11221122
case ghcVariant of
11231123
GHCCustom _ -> return ()
11241124
_ -> throwM RequireCustomGHCVariant
1125-
case wanted of
1126-
WCGhc version ->
1127-
return (version, GHCDownloadInfo mempty mempty DownloadInfo
1128-
{ downloadInfoUrl = T.pack bindistURL
1129-
, downloadInfoContentLength = Nothing
1130-
, downloadInfoSha1 = Nothing
1131-
, downloadInfoSha256 = Nothing
1132-
})
1133-
_ ->
1134-
throwM WantedMustBeGHC
1125+
return (version, GHCDownloadInfo mempty mempty DownloadInfo
1126+
{ downloadInfoUrl = T.pack bindistURL
1127+
, downloadInfoContentLength = Nothing
1128+
, downloadInfoSha1 = Nothing
1129+
, downloadInfoSha256 = Nothing
1130+
})
11351131
_ -> do
11361132
ghcKey <- getGhcKey ghcBuild
11371133
case Map.lookup ghcKey $ siGHCs si of

0 commit comments

Comments
 (0)