diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-01-30 10:34:25 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-01-30 10:39:05 +0100 |
commit | 276c46211feedf979118b654b5310ac45d2434db (patch) | |
tree | 2ca9bb75da0fb8d78b592f4f58e5229b15c7ad0a /libraries/base/Foreign | |
parent | cc4ba35f054ff728781b47a8a52edef29aaed59f (diff) | |
download | haskell-276c46211feedf979118b654b5310ac45d2434db.tar.gz |
Derive `FiniteBits` for integral newtype wrappers
When `FiniteBits` was introduced in cddc9024e67a6d4c01bb190839d0134af8c907e0
only the standard Haskell 2010 finite-size integral types were given a
`FiniteBits` instance, however, since also a DEPRECATION warning was put
in place (as per 701d9ed4b2bec5922709a91bfb625881d7dd47f0) for `bitSize`
which might point people to to `FiniteBits`, it seems sensible to derive
`FiniteBits` for all integral newtype wrappers as well.
N.B.: This makes `Integer` the only type in `base` with a `Bits`
instance but no `FiniteBits` instance.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/Foreign')
-rw-r--r-- | libraries/base/Foreign/C/Types.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/Foreign/C/Types.hs b/libraries/base/Foreign/C/Types.hs index 3a35510148..4aeae53df6 100644 --- a/libraries/base/Foreign/C/Types.hs +++ b/libraries/base/Foreign/C/Types.hs @@ -74,7 +74,7 @@ module Foreign.C.Types ) where import Foreign.Storable -import Data.Bits ( Bits(..) ) +import Data.Bits ( Bits(..), FiniteBits(..) ) import Data.Int ( Int8, Int16, Int32, Int64 ) import Data.Word ( Word8, Word16, Word32, Word64 ) import Data.Typeable |