Skip to content

Commit

Permalink
feat: Add version info to the banner of C++ code
Browse files Browse the repository at this point in the history
  • Loading branch information
kmyk committed Jul 30, 2021
1 parent f787b4f commit 6ba1a04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Jikka/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ main name args = do
putStr usage
return ExitSuccess
(parsed, _, []) | Version `elem` parsed -> do
putStrLn $ showVersion version
putStrLn $ 'v' : showVersion version
return ExitSuccess
(parsed, [subcmd, path], []) -> case parseFlags name parsed of
Left err -> do
Expand Down Expand Up @@ -128,7 +128,7 @@ runSubcommand subcmd opts path = case subcmd of
return $
if embedOriginalCode opts
then
let headers = ["// This C++ code is transpiled using Jikka transpiler https://github.com/kmyk/Jikka", "// The original Python code:"]
let headers = ["// This C++ code is transpiled using Jikka transpiler v" <> T.pack (showVersion version) <> " https://github.com/kmyk/Jikka", "// The original Python code:"]
in T.unlines (headers ++ map ("// " <>) (T.lines input)) <> output
else output
liftIO $ T.putStr output
Expand Down

0 comments on commit 6ba1a04

Please sign in to comment.