Add constant-folding rule for Data.Bits.bit
authorBen Gamari <bgamari.foss@gmail.com>
Wed, 23 Sep 2015 18:10:13 +0000 (13:10 -0500)
committerAustin Seipp <austin@well-typed.com>
Wed, 23 Sep 2015 18:11:04 +0000 (13:11 -0500)
commitcf90a1e14efb900f94a3824b242be1c38b16a563
treeeeef9c818f20cee8b0f75083bdf2cb201f525449
parent939a7d6367501d43be73f4e41db7395af1194989
Add constant-folding rule for Data.Bits.bit

This adds a constant-folding rule for `Integer`'s implementation of `bit` and
fixes the `T8832` testcase. Fixes #8832.

Reviewed By: simonpj, austin

Differential Revision: https://phabricator.haskell.org/D1255

GHC Trac Issues: #8832
compiler/prelude/PrelNames.hs
compiler/prelude/PrelRules.hs
testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T8832.stdout
testsuite/tests/simplCore/should_compile/all.T