From 442e45db830166b3a9ef70320eaf45c5b845abda Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Sun, 14 Sep 2008 11:33:24 +0000 Subject: [PATCH] Don't try to float type-lets A type let shouldn't really occur in SetLevels, but if it does, this patch makes sure it is left alone. --- compiler/simplCore/SetLevels.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/simplCore/SetLevels.lhs b/compiler/simplCore/SetLevels.lhs index f5a5a26..4411d74 100644 --- a/compiler/simplCore/SetLevels.lhs +++ b/compiler/simplCore/SetLevels.lhs @@ -481,7 +481,9 @@ lvlBind :: TopLevelFlag -- Used solely to decide whether to clone -> LvlM (LevelledBind, LevelEnv) lvlBind top_lvl ctxt_lvl env (AnnNonRec bndr rhs@(rhs_fvs,_)) - | isInlineCtxt ctxt_lvl -- Don't do anything inside InlineMe + | isTyVar bndr -- Don't do anything for TyVar binders + -- (simplifier gets rid of them pronto) + || isInlineCtxt ctxt_lvl -- Don't do anything inside InlineMe = do rhs' <- lvlExpr ctxt_lvl env rhs return (NonRec (TB bndr ctxt_lvl) rhs', env) -- 1.7.10.4