From 406a82d9e3d48348614fc20030b43297960e96a2 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 6 Feb 2003 17:37:50 +0000 Subject: [PATCH] [project @ 2003-02-06 17:37:50 by simonpj] Deal with TForall in cvtType --- ghc/compiler/hsSyn/Convert.lhs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/hsSyn/Convert.lhs b/ghc/compiler/hsSyn/Convert.lhs index 02a9406..9dbf8de 100644 --- a/ghc/compiler/hsSyn/Convert.lhs +++ b/ghc/compiler/hsSyn/Convert.lhs @@ -21,7 +21,7 @@ import HsSyn as Hs Pat(..), HsConDetails(..), HsOverLit, BangType(..), placeHolderType, HsType(..), HsTupCon(..), HsTyVarBndr(..), HsContext, - mkSimpleMatch + mkSimpleMatch, mkHsForAllTy ) import RdrName ( RdrName, mkRdrUnqual, mkRdrQual, mkOrig ) @@ -288,6 +288,10 @@ cvtType ty = trans (root ty []) trans (Tvar nm, args) = foldl HsAppTy (HsTyVar (tName nm)) args trans (Tcon tc, args) = foldl HsAppTy (HsTyVar (tc_name tc)) args + trans (TForall tvs cxt ty, []) = mkHsForAllTy (Just (cvt_tvs tvs)) + (cvt_context cxt) + (cvtType ty) + tc_name (TconName nm) = tconName nm tc_name Arrow = tconName "->" tc_name List = tconName "[]" -- 1.7.10.4