[commit: ghc] master: Fix freezing on bare ')' with alternative layout rule (#8431) (6c122f9)
git at git.haskell.org
git
Sat Oct 12 02:19:24 UTC 2013
Repository : ssh://git at git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6c122f9c8850df6b6869af17cf7420e7da5c3270/ghc
>---------------------------------------------------------------
commit 6c122f9c8850df6b6869af17cf7420e7da5c3270
Author: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Date: Sat Oct 12 04:15:17 2013 +0200
Fix freezing on bare ')' with alternative layout rule (#8431)
Patch by errge
>---------------------------------------------------------------
6c122f9c8850df6b6869af17cf7420e7da5c3270
compiler/parser/Lexer.x | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index 18a9e53..63ee1f7 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -2265,7 +2265,7 @@ alternativeLayoutRuleToken t
[] ->
do let ls = if isALRopen u
then [ALRNoLayout (containsCommas u) False]
- else ls
+ else []
setALRContext ls
-- XXX This is an error in John's code, but
-- it looks reachable to me at first glance
More information about the ghc-commits
mailing list