diff --git a/ghc/compiler/nativeGen/AbsCStixGen.lhs b/ghc/compiler/nativeGen/AbsCStixGen.lhs index 4c7553f27a096c648403f51ec7c24fda32145dd4..7c943b404c507de20804098cdab9e018fb90973c 100644 --- a/ghc/compiler/nativeGen/AbsCStixGen.lhs +++ b/ghc/compiler/nativeGen/AbsCStixGen.lhs @@ -416,7 +416,7 @@ be tuned.) \begin{code} intTag :: Literal -> Integer - intTag (MachChar c) = fromInt (ord c) + intTag (MachChar c) = toInteger (ord c) intTag (MachInt i _) = i intTag _ = panic "intTag" diff --git a/ghc/compiler/nativeGen/StixInfo.lhs b/ghc/compiler/nativeGen/StixInfo.lhs index b72675f185302d053338d31f4b8a2608698d8b72..17bbf98d55094ec916ee6b099d17b6ed5421693c 100644 --- a/ghc/compiler/nativeGen/StixInfo.lhs +++ b/ghc/compiler/nativeGen/StixInfo.lhs @@ -25,6 +25,10 @@ import BitSet ( intBS ) import Bits import Word + +#if __GLASGOW_HASKELL__ >= 404 +import GlaExts ( fromInt ) +#endif \end{code} Generating code for info tables (arrays of data).