From: simonpj Date: Thu, 10 Jul 2003 08:16:54 +0000 (+0000) Subject: [project @ 2003-07-10 08:16:54 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~697 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=6c2e162376df87192b7a65461f452a776e7f5116 [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) --- 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