From 1683eefd522552901d2b49b3c6619d07dcc5d467 Mon Sep 17 00:00:00 2001
From: simonpj <unknown>
Date: Mon, 17 Jul 2000 07:47:04 +0000
Subject: [PATCH] [project @ 2000-07-17 07:47:04 by simonpj] Add comments

---
 ghc/compiler/typecheck/TcTyDecls.lhs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ghc/compiler/typecheck/TcTyDecls.lhs b/ghc/compiler/typecheck/TcTyDecls.lhs
index 226918e4bb2d..acb15586e8c6 100644
--- a/ghc/compiler/typecheck/TcTyDecls.lhs
+++ b/ghc/compiler/typecheck/TcTyDecls.lhs
@@ -67,10 +67,18 @@ tcTyDecl1 (TySynonym tycon_name tyvar_names rhs src_loc)
   = tcLookupTy tycon_name			`thenNF_Tc` \ (ATyCon tycon) ->
     tcExtendTyVarEnv (tyConTyVars tycon)	$
     tcHsType rhs				`thenTc` \ rhs_ty ->
+	-- Note tcHsType not tcHsSigType; we allow type synonyms
+	-- that aren't types; e.g.  type List = []
+	--
 	-- If the RHS mentions tyvars that aren't in scope, we'll 
-	-- quantify over them.  With gla-exts that's right, but for H98
-	-- we should complain. We can now do that here without falling into
+	-- quantify over them:
+	--	e.g. 	type T = a->a
+	-- will become	type T = forall a. a->a
+	--
+	-- With gla-exts that's right, but for H98 we should complain. 
+	-- We can now do that here without falling into
 	-- a black hole, we still do it in rnDecl (TySynonym case)
+
     returnTc (tycon_name, SynTyDetails rhs_ty)
 
 tcTyDecl1 (TyData _ context tycon_name _ con_decls _ derivings _  src_loc)
-- 
GitLab