From c051a786be1264030c12d492330aed605d60b89a Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Wed, 2 Oct 2019 06:36:22 -0400 Subject: [PATCH] use index 0 instead of head to get first element of arg list --- semantic-ast/src/CLI.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic-ast/src/CLI.hs b/semantic-ast/src/CLI.hs index d141dc5c7..bcf12e1e6 100644 --- a/semantic-ast/src/CLI.hs +++ b/semantic-ast/src/CLI.hs @@ -13,6 +13,6 @@ import System.IO (FilePath) main :: IO () main = do - args <- head <$> getArgs - bytestring <- Data.ByteString.readFile args + args <- getArgs + bytestring <- Data.ByteString.readFile (args !! 0) print =<< parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring