diff --git a/src/Arguments.hs b/src/Arguments.hs index f903a6dbe..a963d6def 100644 --- a/src/Arguments.hs +++ b/src/Arguments.hs @@ -30,13 +30,6 @@ data ParseArguments where deriving instance Show ParseArguments -type ParseArguments' = ParseMode -> ParseArguments - -sExpressionParseTree :: ParseArguments' -sExpressionParseTree = ParseArguments SExpressionTermRenderer - -jsonParseTree :: ParseArguments' -jsonParseTree = ParseArguments JSONTermRenderer data ProgramMode = Parse ParseArguments | Diff DiffArguments deriving Show diff --git a/src/SemanticCmdLine.hs b/src/SemanticCmdLine.hs index c518404ca..2f62e211e 100644 --- a/src/SemanticCmdLine.hs +++ b/src/SemanticCmdLine.hs @@ -73,8 +73,8 @@ arguments = info (version <*> helper <*> argumentsParser) description parseCommand = command "parse" (info parseArgumentsParser (progDesc "Print parse trees for path(s)")) parseArgumentsParser = Parse - <$> ( ( flag sExpressionParseTree sExpressionParseTree (long "sexpression" <> help "Output s-expression parse trees (default)") - <|> flag' jsonParseTree (long "json" <> help "Output JSON parse trees") ) + <$> ( ( flag (ParseArguments SExpressionTermRenderer) (ParseArguments SExpressionTermRenderer) (long "sexpression" <> help "Output s-expression parse trees (default)") + <|> flag' (ParseArguments JSONTermRenderer) (long "json" <> help "Output JSON parse trees") ) <*> ( ParsePaths <$> some (argument filePathReader (metavar "FILES...")) <|> pure ParseStdin ))