X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fparser%2FRdrHsSyn.lhs;h=3697819afb6fde5e94edf81276363fa8b706047b;hb=bcbdcc2b6cdb98312593d938aeb667e9a161e98a;hp=1a6b3fe32d3864a722bce4bb05626cfa352e2089;hpb=d01159bb27d84898a48ef2783d3cb59d4ce0e30e;p=ghc-hetmet.git diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index 1a6b3fe..3697819 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -515,7 +515,9 @@ checkTyClHdr (L l cxt) ty extractTyVars :: [LHsType RdrName] -> P [LHsTyVarBndr RdrName] extractTyVars tvs = collects tvs [] where - -- Collect all variables (1st arg serves as an accumulator) + -- Collect all variables (2nd arg serves as an accumulator) + collect :: LHsType RdrName -> [LHsTyVarBndr RdrName] + -> P [LHsTyVarBndr RdrName] collect (L l (HsForAllTy _ _ _ _)) = const $ parseError l "Forall type not allowed as type parameter" collect (L l (HsTyVar tv)) @@ -1021,6 +1023,7 @@ parseDImport (L loc entity) = parse0 comps 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