Remove bitSize from MINIMAL pragma of class Bits
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- haskell
- Domain
- developer-experience
Research direction
Start at the class Bits declaration and inspect the MINIMAL pragma shown in the issue, along with the default implementation of bitSize. Remove bitSize from the pragma while preserving the other requirements, then verify that the resulting declaration allows Bits instances to omit bitSize without an incomplete-instance warning.
Written by the indexing model from the issue text.
Description
bitSize is a member of class Bits, deprecated because of being partial in favor of total bitSizeMaybe and finiteBitSize back in base-4.7 (GHC 7.8, 2014).
Yet despite being deprecated bitSize remained a member of
{-# MINIMAL (.&.), (.|.), xor, complement,
(shift | (shiftL, shiftR)),
(rotate | (rotateL, rotateR)),
bitSize, bitSizeMaybe, isSigned, testBit, bit, popCount #-}
which is very awkward: anyone defining instance Bits Foo has either define bitSize and receive a deprecation warning, or not define it and receive a warning about incomplete instance declaration.
Even when bitSize got a default implementation in base-4.12, it still remained a mandatory {-# MINIMAL #-} member of class Bits.
The proposal thus is to remove bitSize from {-# MINIMAL #-} of class Bits, allowing library authors finally to act on the deprecation warning and stop defining this function in their instances of Bits.
The proposal is meant to be a first step to a future removal of bitSize from class Bits as discussed in #440.
This proposal is not a breaking change.
- Dominant language
- Haskell
- Stars
- 109
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/core-libraries-committee
-
Fix foldl Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
haskell/core-libraries-committee#439 · 32 comments · 10 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
haskell/core-libraries-committee#438 · 5 comments · 4 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
haskell/core-libraries-committee#435 · 36 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
haskell/core-libraries-committee#434 · 4 comments · 5 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
haskell/core-libraries-committee#430 · 8 comments · 1 reaction ·
All issues in haskell/core-libraries-committee
Similar issues
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
koalaman/shellcheck#3539 ·
-
time-manager-0.4.0 Openfailure: bounds
Difficulty 1/5 Under an hour Newbie friendliness 72/100
commercialhaskell/stackage#8122 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/phino#1350 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100