From aafe9f47bc14765cb8cd34449d119cf2c4953020 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 26 Sep 2019 12:19:02 -0400 Subject: [PATCH] Reformat an if statement. --- src/Parsing/TreeSitter.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Parsing/TreeSitter.hs b/src/Parsing/TreeSitter.hs index 0f09097ad..da4e2eb51 100644 --- a/src/Parsing/TreeSitter.hs +++ b/src/Parsing/TreeSitter.hs @@ -43,13 +43,12 @@ runParserToAST parser blobSource = unsafeUseAsCStringLen (Source.bytes blobSourc | t == nullPtr = pure () | otherwise = TS.ts_tree_delete t - go treePtr = - if treePtr == nullPtr - then pure Failed - else do - TS.ts_tree_root_node_p treePtr rootPtr - ptr <- peek rootPtr - Succeeded <$> anaM toAST ptr + go treePtr = if treePtr == nullPtr then + pure Failed + else do + TS.ts_tree_root_node_p treePtr rootPtr + ptr <- peek rootPtr + Succeeded <$> anaM toAST ptr in Exc.bracket acquire release go) -- | Parse 'Source' with the given 'TS.Language' and return its AST.