From b681077b59fb63833709db79737ec0a4e8a02b49 Mon Sep 17 00:00:00 2001 From: Ian Lynagh <ian@well-typed.com> Date: Sun, 19 May 2013 17:45:37 +0100 Subject: [PATCH] Fix build If we use "smallInteger 0#" in the definitions, then that turns into an Integer literal, but the compiler can't handle Integer literals while compiling the integer package (as it can't look up the mkInteger Id yet). --- GHC/Integer/Type.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GHC/Integer/Type.hs b/GHC/Integer/Type.hs index ee2c08f..f87f1c3 100644 --- a/GHC/Integer/Type.hs +++ b/GHC/Integer/Type.hs @@ -318,8 +318,8 @@ shiftRInteger Naught _ = Naught -- reimplementation of the default Data.Bits instance, so that we can -- implement the Integer interface testBitInteger :: Integer -> Int# -> Bool -testBitInteger x i = (x `andInteger` (smallInteger 1# `shiftLInteger` i)) - `neqInteger` smallInteger 0# +testBitInteger x i = (x `andInteger` (oneInteger `shiftLInteger` i)) + `neqInteger` Naught twosComplementPositive :: Positive -> DigitsOnes twosComplementPositive p = flipBits (p `minusPositive` onePositive) -- GitLab