Adam Gundry pushed to branch wip/amg/T26037 at Glasgow Haskell Compiler / GHC
Commits:
-
d099d2e9
by Adam Gundry at 2025-06-05T07:50:57+02:00
2 changed files:
Changes:
... | ... | @@ -28,7 +28,8 @@ module GHCi.UI ( |
28 | 28 | GhciSettings(..),
|
29 | 29 | defaultGhciSettings,
|
30 | 30 | ghciCommands,
|
31 | - ghciWelcomeMsg
|
|
31 | + ghciWelcomeMsg,
|
|
32 | + languageEditionMsg
|
|
32 | 33 | ) where
|
33 | 34 | |
34 | 35 | -- GHCi
|
... | ... | @@ -199,6 +200,10 @@ ghciWelcomeMsg :: String |
199 | 200 | ghciWelcomeMsg = "GHCi, version " ++ cProjectVersion ++
|
200 | 201 | ": https://www.haskell.org/ghc/ :? for help"
|
201 | 202 | |
203 | +languageEditionMsg :: Maybe Language -> String
|
|
204 | +languageEditionMsg Nothing = "Using default language edition: " ++ show defaultLanguage
|
|
205 | +languageEditionMsg (Just lang) = "Using language edition: " ++ show lang
|
|
206 | + |
|
202 | 207 | ghciCommands :: [Command]
|
203 | 208 | ghciCommands = map mkCmd [
|
204 | 209 | -- Hugs users are accustomed to :e, so make sure it doesn't overlap
|
... | ... | @@ -38,7 +38,7 @@ import GHC.Platform |
38 | 38 | import GHC.Platform.Host
|
39 | 39 | |
40 | 40 | #if defined(HAVE_INTERNAL_INTERPRETER)
|
41 | -import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings )
|
|
41 | +import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings, languageEditionMsg )
|
|
42 | 42 | #endif
|
43 | 43 | |
44 | 44 | import GHC.Runtime.Loader ( loadFrontendPlugin, initializeSessionPlugins )
|
... | ... | @@ -334,7 +334,9 @@ showBanner _postLoadMode dflags = do |
334 | 334 | |
335 | 335 | #if defined(HAVE_INTERNAL_INTERPRETER)
|
336 | 336 | -- Show the GHCi banner
|
337 | - when (isInteractiveMode _postLoadMode && verb >= 1) $ putStrLn ghciWelcomeMsg
|
|
337 | + when (isInteractiveMode _postLoadMode && verb >= 1) $
|
|
338 | + do putStrLn ghciWelcomeMsg
|
|
339 | + putStrLn $ languageEditionMsg (language dflags)
|
|
338 | 340 | #endif
|
339 | 341 | |
340 | 342 | -- Display details of the configuration in verbose mode
|