Add a necessary [] error case
authorIan Lynagh <igloo@earth.li>
Wed, 13 Feb 2008 15:42:32 +0000 (15:42 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 13 Feb 2008 15:42:32 +0000 (15:42 +0000)
compiler/parser/RdrHsSyn.lhs

index 1a6b3fe..458ebf4 100644 (file)
@@ -1021,6 +1021,7 @@ parseDImport (L loc entity) = parse0 comps
   parse2 _ _ [] = d'oh
   parse2 isStatic kind (('[':x):xs) =
      case x of
   parse2 _ _ [] = d'oh
   parse2 isStatic kind (('[':x):xs) =
      case x of
+        [] -> d'oh
         vs | last vs == ']' -> parse3 isStatic kind (init vs) xs
         _ -> d'oh
   parse2 isStatic kind xs = parse3 isStatic kind "" xs
         vs | last vs == ']' -> parse3 isStatic kind (init vs) xs
         _ -> d'oh
   parse2 isStatic kind xs = parse3 isStatic kind "" xs