From a9f6068a7bc19ae72f60ff903f7a50904450ae6d Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Tue, 22 Oct 2019 13:41:13 -0400 Subject: [PATCH] color can only have if pretty --- semantic-ast/src/Main.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/semantic-ast/src/Main.hs b/semantic-ast/src/Main.hs index 98a6d19f6..bb30ae237 100644 --- a/semantic-ast/src/Main.hs +++ b/semantic-ast/src/Main.hs @@ -51,10 +51,9 @@ generateAST (SemanticAST format color source) = do ast <- parseByteString @AST.Module @(Range, Span) Python.tree_sitter_python bytestring case format of Show -> print ast - Pretty -> pPrint ast - case color of - True -> pPrintNoColor ast - False -> pPrint ast + Pretty -> case color of + True -> pPrintNoColor ast + False -> pPrint ast opts :: ParserInfo SemanticAST opts = info (parseAST <**> helper)