We can't use Integer literals when compiling the integer-* package, either
authorIan Lynagh <ian@well-typed.com>
Sun, 19 May 2013 16:47:30 +0000 (17:47 +0100)
committerIan Lynagh <ian@well-typed.com>
Sun, 19 May 2013 16:47:30 +0000 (17:47 +0100)
compiler/coreSyn/CorePrep.lhs

index e55f595..3d642bd 100644 (file)
@@ -1113,6 +1113,8 @@ lookupMkIntegerName :: DynFlags -> HscEnv -> IO Id
 lookupMkIntegerName dflags hsc_env
     = if thisPackage dflags == primPackageId
       then return $ panic "Can't use Integer in ghc-prim"
+      else if thisPackage dflags == integerPackageId
+      then return $ panic "Can't use Integer in integer"
       else liftM tyThingId
          $ initTcForLookup hsc_env (tcLookupGlobal mkIntegerName)