X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FLiteral.lhs;h=aa3cdd5d5d063115496009704980535ee4000aca;hb=f41e3ea766c340c49b829eabfdea7c77bda2a95e;hp=d6e9274ae630b9134463e5be73f035e16cb47d15;hpb=b71760aac3a1b2e7d772a4c0457ff3f19eac8631;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Literal.lhs b/compiler/basicTypes/Literal.lhs index d6e9274..aa3cdd5 100644 --- a/compiler/basicTypes/Literal.lhs +++ b/compiler/basicTypes/Literal.lhs @@ -49,9 +49,10 @@ import FastTypes import FastString import BasicTypes import Binary -import Ratio +import Constants import Data.Int +import Data.Ratio import Data.Word import Data.Char \end{code} @@ -59,32 +60,6 @@ import Data.Char %************************************************************************ %* * -\subsection{Sizes} -%* * -%************************************************************************ - -If we're compiling with GHC (and we're not cross-compiling), then we -know that minBound and maxBound :: Int are the right values for the -target architecture. Otherwise, we assume -2^31 and 2^31-1 -respectively (which will be wrong on a 64-bit machine). - -\begin{code} -tARGET_MIN_INT, tARGET_MAX_INT, tARGET_MAX_WORD :: Integer -#ifdef __GLASGOW_HASKELL__ -tARGET_MIN_INT = toInteger (minBound :: Int) -tARGET_MAX_INT = toInteger (maxBound :: Int) -#else -tARGET_MIN_INT = -2147483648 -tARGET_MAX_INT = 2147483647 -#endif -tARGET_MAX_WORD = (tARGET_MAX_INT * 2) + 1 - -tARGET_MAX_CHAR :: Int -tARGET_MAX_CHAR = 0x10ffff -\end{code} - -%************************************************************************ -%* * \subsection{Literals} %* * %************************************************************************