From e684907c9e0a7a6a7a507247c7f95a971eeb827f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 8 Aug 2017 14:54:40 -0400 Subject: [PATCH] Refactor withStatement to avoid a bind. --- src/Language/Python/Syntax.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/Python/Syntax.hs b/src/Language/Python/Syntax.hs index 63e8df965..dc875499a 100644 --- a/src/Language/Python/Syntax.hs +++ b/src/Language/Python/Syntax.hs @@ -207,7 +207,7 @@ argumentList :: Assignment argumentList = makeTerm <$> symbol ArgumentList <*> children (many expression) withStatement :: Assignment -withStatement = symbol WithStatement >>= \ loc -> children (mk loc <$> some with) +withStatement = mk <$> symbol WithStatement <*> children (some with) where mk _ [child] = child mk l children = makeTerm l children