cgConst c@(TT.BI i) = do
  let stringRepLen = (if i < 0 then 2 else 1) + fromInteger (numDigits 10 i)
  str <- addGlobal' (ArrayType stringRepLen (IntegerType 8)) (cgConst' c)
  mpz <- alloc mpzTy
  inst $ simpleCall "__gmpz_init_set_str" [mpz
                                          , ConstantOperand $ C.GetElementPtr True str [ C.Int 32 0, C.Int 32 0]
                                          , ConstantOperand $ C.Int 32 10
                                          ]
  box (FArith (ATInt ITBig)) mpz
cgConst c@(TT.BI i) = do
  let stringRepLen = (if i < 0 then 2 else 1) + fromInteger (numDigits 10 i)
  str <- addGlobal' (ArrayType stringRepLen (IntegerType 8)) (cgConst' c)
  mpz <- alloc mpzTy
  inst $ simpleCall "__gmpz_init_set_str" [mpz
                                          , ConstantOperand $ C.GetElementPtr True str [ C.Int 32 0, C.Int 32 0]
                                          , ConstantOperand $ C.Int 32 10
                                          ]
  box (FArith (ATInt ITBig)) mpz
cgConst c@(TT.BI i) = do
  let stringRepLen = (if i < 0 then 2 else 1) + fromInteger (numDigits 10 i)
  str <- addGlobal' (ArrayType stringRepLen (IntegerType 8)) (cgConst' c)
  mpz <- alloc mpzTy
  inst $ simpleCall "__gmpz_init_set_str" [mpz
                                          , ConstantOperand $ C.GetElementPtr True str [ C.Int 32 0, C.Int 32 0]
                                          , ConstantOperand $ C.Int 32 10
                                          ]
  box (FArith (ATInt ITBig)) mpz