Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/App/Arguments.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module App.Arguments (
import Control.Applicative
import Data.Maybe
import Data.Version (showVersion)
import GHC.Iface.Ext.Types qualified as GHC
import Options.Applicative
import Paths_static_ls (version)
import StaticLS.StaticEnv.Options
Expand All @@ -20,6 +21,9 @@ import Text.Read
currVersion :: String
currVersion = showVersion version

hieBuiltVersion :: String
hieBuiltVersion = show GHC.hieVersion

data PrgOptions
= StaticLsOptions
{ staticEnvOpts :: StaticEnvOptions
Expand All @@ -46,6 +50,7 @@ handleParseResultWithSuppression defaultOpts res = case res of
Success (StaticLsOptions {showVer = True}) -> do
-- Show version info
putStrLn $ "static-ls, version " <> currVersion
putStrLn $ "hie version " <> hieBuiltVersion
exitSuccess
Success a -> return a.staticEnvOpts
-- Ignore if invalid arguments are input
Expand Down Expand Up @@ -85,7 +90,7 @@ argParser defaultOpts =
True
( long "version"
<> short 'v'
<> help "Show the program version"
<> help "Show the program version and HIE version"
)
<*> flag
False
Expand Down
Loading