diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2021-01-24 14:42:42 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-27 17:43:49 -0500 |
commit | 831ba0fb216e7481d1fb299b1cff09298b060370 (patch) | |
tree | 16c108866a3a081e0f200c89bd0956a67d26f3e8 /libraries/base | |
parent | 9c87f97ee9e697b6609db892a503fc053dc8f901 (diff) | |
download | haskell-831ba0fb216e7481d1fb299b1cff09298b060370.tar.gz |
Fix doctest examples in Data.Bits
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/Data/Bits.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index 95105a4b3f..73ebfbc03c 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -63,12 +63,16 @@ import GHC.Enum import GHC.Read import GHC.Show +-- $setup +-- >>> import Prelude +-- >>> import Data.Word + -- | A more concise version of @complement zeroBits@. -- --- >>> complement zeroBits :: Word == oneBits :: Word +-- >>> complement (zeroBits :: Word) == (oneBits :: Word) -- True -- --- >>> complement oneBits :: Word == zeroBits :: Word +-- >>> complement (oneBits :: Word) == (zeroBits :: Word) -- True -- -- = Note @@ -142,7 +146,7 @@ instance (Bits a) => Monoid (Ior a) where -- | Monoid under bitwise XOR. -- --- >>> getXor (Xor 0xab <> 0x12) :: Word8 +-- >>> getXor (Xor 0xab <> Xor 0x12) :: Word8 -- 185 -- -- @since 4.16 |