From: simonpj Date: Wed, 15 Dec 2004 15:28:39 +0000 (+0000) Subject: [project @ 2004-12-15 15:28:39 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1342 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f8dfc857924a89b26b2e091c09cc731d868af7c6;p=ghc-hetmet.git [project @ 2004-12-15 15:28:39 by simonpj] Comments only --- 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