Skip to content

Commit

Permalink
Remove haskell-suite-dummy-program hack
Browse files Browse the repository at this point in the history
There was some hacky logic in place to give a "haskell-suite" compiler
a dummy location so that we would attempt to configure it.

This logic is no longer necessary since 'configureRequiredProgram' was
changed to accomodate the situation in which 'lookupKnownProgram' fails.
In fact, it is downright harmful, as this dummy location will trigger
errors when we attempt to configure all known programs, which is
a necessary step before attempting to serialise a program database.
  • Loading branch information
sheaf authored and Mikolaj committed Jun 15, 2024
1 parent 0a0cc19 commit 6ac9dfb
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Cabal/src/Distribution/Simple/Program/Builtin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,13 @@ hpcProgram =
-- during the configure phase.
haskellSuiteProgram :: Program
haskellSuiteProgram =
(simpleProgram "haskell-suite")
{ -- pretend that the program exists, otherwise it won't be in the
-- "configured" state
programFindLocation = \_verbosity _searchPath ->
return $ Just ("haskell-suite-dummy-location", [])
}
simpleProgram "haskell-suite"

-- This represent a haskell-suite package manager. See the comments for
-- haskellSuiteProgram.
haskellSuitePkgProgram :: Program
haskellSuitePkgProgram =
(simpleProgram "haskell-suite-pkg")
{ programFindLocation = \_verbosity _searchPath ->
return $ Just ("haskell-suite-pkg-dummy-location", [])
}
simpleProgram "haskell-suite-pkg"

happyProgram :: Program
happyProgram =
Expand Down

0 comments on commit 6ac9dfb

Please sign in to comment.