From 8ebebb4500e688f57970a661c8afe888eb52162d Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Wed, 28 Jul 1999 08:34:45 +0000
Subject: [PATCH] [project @ 1999-07-28 08:34:45 by simonmar] Allow unboxed
 tuple components to have polymorphic types.

---
 ghc/compiler/rename/RnSource.lhs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ghc/compiler/rename/RnSource.lhs b/ghc/compiler/rename/RnSource.lhs
index a1e1678efce2..780c91f7f021 100644
--- a/ghc/compiler/rename/RnSource.lhs
+++ b/ghc/compiler/rename/RnSource.lhs
@@ -629,9 +629,13 @@ rnHsType doc (MonoListTy ty)
   = rnHsType doc ty				`thenRn` \ (ty', fvs) ->
     returnRn (MonoListTy ty', fvs `addOneFV` listTyCon_name)
 
+-- Unboxed tuples are allowed to have poly-typed arguments.  These
+-- sometimes crop up as a result of CPR worker-wrappering dictionaries.
 rnHsType doc (MonoTupleTy tys boxed)
-  = rnHsTypes doc tys			`thenRn` \ (tys', fvs) ->
-    returnRn (MonoTupleTy tys' boxed, fvs `addOneFV` tup_con_name)
+  = (if boxed 
+      then mapFvRn (rnHsType doc)     tys
+      else mapFvRn (rnHsPolyType doc) tys)  `thenRn` \ (tys', fvs) ->
+    returnRn (MonoTupleTy tys' boxed, fvs   `addOneFV` tup_con_name)
   where
     tup_con_name = tupleTyCon_name boxed (length tys)
 
-- 
GitLab