Ticket #5541 (closed bug: invalid)
Data.Bits.setBit misbehaves on bad input
ghc -e 'Data.Bits.setBit 0 (2^36::Int) :: Integer'
seems to “work” (allocates lots of memory and keeps calculating), it mis-behaves with larger numbers:
$ ghc -e 'Data.Bits.setBit 0 (2^37::Int) :: Integer' gmp: overflow in mpz type Abgebrochen
If gmp cannot cope with that number, an exception should be raised, but not the whole process terminated.
Natuarlly, this is not a very critical bug.