From: simonpj Date: Tue, 30 Nov 1999 08:46:25 +0000 (+0000) Subject: [project @ 1999-11-30 08:46:25 by simonpj] X-Git-Tag: Approximately_9120_patches~5469 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a18aa9d7055561810945b810584b02f685c01089;p=ghc-hetmet.git [project @ 1999-11-30 08:46:25 by simonpj] Allow a for-all type inside a usage annotation: __u - (forall a. type) [This actually simply inolved making rnHsType a bit more permissive.] The particular way this shows up right now is a bug that Keith is working on, but in general it should be legal. --- diff --git a/ghc/compiler/rename/RnSource.lhs b/ghc/compiler/rename/RnSource.lhs index 74d4a07..cb8861d 100644 --- a/ghc/compiler/rename/RnSource.lhs +++ b/ghc/compiler/rename/RnSource.lhs @@ -654,7 +654,8 @@ rnHsType doc (MonoUsgForAllTy uv_rdr ty) rnHsType doc (MonoUsgTy usg ty) = newUsg usg `thenRn` \ (usg', usg_fvs) -> - rnHsType doc ty `thenRn` \ (ty', ty_fvs) -> + rnHsPolyType doc ty `thenRn` \ (ty', ty_fvs) -> + -- A for-all can occur inside a usage annotation returnRn (MonoUsgTy usg' ty', usg_fvs `plusFV` ty_fvs) where