[project @ 1999-11-30 08:46:25 by simonpj]
authorsimonpj <unknown>
Tue, 30 Nov 1999 08:46:25 +0000 (08:46 +0000)
committersimonpj <unknown>
Tue, 30 Nov 1999 08:46:25 +0000 (08:46 +0000)
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.

ghc/compiler/rename/RnSource.lhs

index 74d4a07..cb8861d 100644 (file)
@@ -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