From 6c2e162376df87192b7a65461f452a776e7f5116 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 10 Jul 2003 08:16:54 +0000 Subject: [PATCH] [project @ 2003-07-10 08:16:54 by simonpj] Give a more sensible type to big character literals in ExtCore (but it still looks odd to me) --- ghc/compiler/coreSyn/MkExternalCore.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/coreSyn/MkExternalCore.lhs b/ghc/compiler/coreSyn/MkExternalCore.lhs index ff1834f..569655c 100644 --- a/ghc/compiler/coreSyn/MkExternalCore.lhs +++ b/ghc/compiler/coreSyn/MkExternalCore.lhs @@ -26,6 +26,7 @@ import IdInfo import Id ( idUnfolding ) import CoreTidy ( tidyExpr ) import VarEnv ( emptyTidyEnv ) +import TysPrim ( intPrimTy ) import Literal import Name import CostCentre @@ -164,7 +165,8 @@ make_lit :: Literal -> C.Lit make_lit l = case l of MachChar i | i <= 0xff -> C.Lchar (chr i) t - MachChar i | otherwise -> C.Lint (toEnum i) t + MachChar i | otherwise -> C.Lint (toEnum i) (make_ty intPrimTy) + -- For 'big' characters, use an integer MachStr s -> C.Lstring (unpackFS s) t MachNullAddr -> C.Lint 0 t MachInt i -> C.Lint i t -- 1.7.10.4