Skip to content

Commit

Permalink
Merge pull request #6427 from commercialhaskell/fix-ambiguity
Browse files Browse the repository at this point in the history
Fix reported ambiguity
  • Loading branch information
mpilgrem authored Jan 14, 2024
2 parents 509f35c + 4311d40 commit d4f2470
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .stan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,25 @@

# Anti-pattern: Data.ByteString.Char8.pack
[[ignore]]
id = "OBS-STAN-0203-hTeu0Y-381:17"
id = "OBS-STAN-0203-hTeu0Y-382:17"
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters
# ✦ Category: #AntiPattern
# ✦ File: src\Stack\Init.hs
#
# 380
# 381 ┃ commentHelp = BC.pack . intercalate "\n" . map commentLine
# 382 ┃ ^^^^^^^
# 381
# 382 ┃ commentHelp = BC.pack . intercalate "\n" . map commentLine
# 383 ┃ ^^^^^^^

# Anti-pattern: Data.ByteString.Char8.pack
[[ignore]]
id = "OBS-STAN-0203-hTeu0Y-398:26"
id = "OBS-STAN-0203-hTeu0Y-399:26"
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters
# ✦ Category: #AntiPattern
# ✦ File: src\Stack\Init.hs
#
# 397
# 398 ┃ <> B.byteString (BC.pack $ concat
# 399 ┃ ^^^^^^^
# 398
# 399 ┃ <> B.byteString (BC.pack $ concat
# 400 ┃ ^^^^^^^

# Anti-pattern: Data.ByteString.Char8.pack
[[ignore]]
Expand Down
8 changes: 5 additions & 3 deletions src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ import Stack.Types.Nix ( NixOpts (..) )
import Stack.Types.Platform
( PlatformVariant (..), platformOnlyRelDir )
import Stack.Types.Project ( Project (..) )
import qualified Stack.Types.Project as Project ( Project (..) )
import Stack.Types.ProjectAndConfigMonoid
( ProjectAndConfigMonoid (..), parseProjectAndConfigMonoid )
import Stack.Types.ProjectConfig ( ProjectConfig (..) )
Expand Down Expand Up @@ -785,9 +786,10 @@ withBuildConfig inner = do
"real project.\n"
pure (p, dest)
mcompiler <- view $ globalOptsL . to (.compiler)
let project = project'
{ compiler = mcompiler <|> project'.compiler
, resolver = fromMaybe project'.resolver mresolver
let project :: Project
project = project'
{ Project.compiler = mcompiler <|> project'.compiler
, Project.resolver = fromMaybe project'.resolver mresolver
}
extraPackageDBs <- mapM resolveDir' project.extraPackageDBs

Expand Down
9 changes: 5 additions & 4 deletions src/Stack/Init.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}

-- | Types and functions related to Stack's @init@ command.
module Stack.Init
Expand Down

0 comments on commit d4f2470

Please sign in to comment.