From f8dfc857924a89b26b2e091c09cc731d868af7c6 Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 15 Dec 2004 15:28:39 +0000 Subject: [PATCH] [project @ 2004-12-15 15:28:39 by simonpj] Comments only --- ghc/compiler/typecheck/TcExpr.lhs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index ce7162c..615a4b0 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -191,6 +191,9 @@ tc_expr (HsLit lit) res_ty = tcLit lit res_ty tc_expr (HsOverLit lit) res_ty = zapExpectedType res_ty liftedTypeKind `thenM` \ res_ty' -> + -- Overloaded literals must have liftedTypeKind, because + -- we're instantiating an overloaded function here, + -- whereas res_ty might be openTypeKind. This was a bug in 6.2.2 newOverloadedLit (LiteralOrigin lit) lit res_ty' `thenM` \ lit_expr -> returnM (unLoc lit_expr) -- ToDo: nasty unLoc -- 1.7.10.4