From 67760145e8855d8ae5d81f7b3429f2980c904f93 Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Fri, 18 Oct 2019 11:23:37 -0400 Subject: [PATCH] case over Format --- semantic-ast/src/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semantic-ast/src/Main.hs b/semantic-ast/src/Main.hs index 406e2ec4a..dad56930f 100644 --- a/semantic-ast/src/Main.hs +++ b/semantic-ast/src/Main.hs @@ -12,6 +12,7 @@ import Data.ByteString (pack, readFile, ByteString) import System.IO (FilePath) import Options.Applicative hiding (style) import Data.Semigroup ((<>)) +import Text.Pretty.Simple (pPrint) data SemanticAST = SemanticAST { format :: Format @@ -46,7 +47,7 @@ generateAST (SemanticAST format source) = do ast <- parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring case format of Show -> print ast - + Pretty -> pPrint ast opts :: ParserInfo SemanticAST opts = info (parseAST <**> helper)