Skip to content

Commit 9e5e88e

Browse files
committed
Fix getLanguages
1 parent 55aea0e commit 9e5e88e

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

Cabal/src/Distribution/Simple/GHC.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ configureCompiler verbosity hcPath conf0 = do
200200
++ prettyShow ghcVersion
201201

202202
let implInfo = ghcVersionImplInfo ghcVersion
203-
languages <- Internal.getLanguages verbosity implInfo ghcProg
203+
languages <- Internal.getLanguages implInfo
204204
extensions0 <- Internal.getExtensions verbosity ghcProg
205205

206206
ghcInfo <- Internal.getGhcInfo verbosity implInfo ghcProg

Cabal/src/Distribution/Simple/GHC/Internal.hs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,9 @@ configureToolchain _implInfo ghcProg ghcInfo =
271271
else return ldProg
272272

273273
getLanguages
274-
:: Verbosity
275-
-> GhcImplInfo
276-
-> ConfiguredProgram
274+
:: GhcImplInfo
277275
-> IO [(Language, String)]
278-
getLanguages _ implInfo _
276+
getLanguages implInfo
279277
-- TODO: should be using --supported-languages rather than hard coding
280278
| supportsGHC2024 implInfo =
281279
return
@@ -290,7 +288,11 @@ getLanguages _ implInfo _
290288
, (Haskell2010, "-XHaskell2010")
291289
, (Haskell98, "-XHaskell98")
292290
]
293-
| otherwise = return [(Haskell98, "")]
291+
| otherwise =
292+
return
293+
[ (Haskell98, "-XHaskell98")
294+
, (Haskell2010, "-XHaskell2010")
295+
]
294296

295297
getGhcInfo
296298
:: Verbosity

Cabal/src/Distribution/Simple/GHCJS.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ configureCompiler verbosity hcPath conf0 = do
153153

154154
let implInfo = ghcjsVersionImplInfo ghcjsVersion ghcjsGhcVersion
155155

156-
languages <- Internal.getLanguages verbosity implInfo ghcjsProg
156+
languages <- Internal.getLanguages implInfo
157157
extensions <- Internal.getExtensions verbosity ghcjsProg
158158

159159
ghcjsInfo <- Internal.getGhcInfo verbosity implInfo ghcjsProg

0 commit comments

Comments
 (0)