From: simonpj@microsoft.com Date: Wed, 26 Nov 2008 15:40:22 +0000 (+0000) Subject: Fix Trac #2817 (TH syntax -> HsSyn conversion) X-Git-Tag: 2009-03-13~395 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a76ba381f76fd9a5178e815206466a97dab46f75;p=ghc-hetmet.git Fix Trac #2817 (TH syntax -> HsSyn conversion) --- diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs index f3401f2..06f6115 100644 --- a/compiler/hsSyn/Convert.lhs +++ b/compiler/hsSyn/Convert.lhs @@ -532,7 +532,9 @@ cvtType ty = do { (head_ty, tys') <- split_ty_app ty | n == 1 -> failWith (ptext (sLit "Illegal 1-tuple type constructor")) | otherwise -> mk_apps (HsTyVar (getRdrName (tupleTyCon Boxed n))) tys' ArrowT | [x',y'] <- tys' -> returnL (HsFunTy x' y') + | otherwise -> mk_apps (HsTyVar (getRdrName funTyCon)) tys' ListT | [x'] <- tys' -> returnL (HsListTy x') + | otherwise -> mk_apps (HsTyVar (getRdrName listTyCon)) tys' VarT nm -> do { nm' <- tName nm; mk_apps (HsTyVar nm') tys' } ConT nm -> do { nm' <- tconName nm; mk_apps (HsTyVar nm') tys' }