Opened 7 years ago

Closed 5 years ago

#7424 closed feature request (fixed)

Add Data.Bits instance for Bool

Reported by: Aninhumer Owned by:
Priority: normal Milestone: 7.8.1
Component: libraries/base Version: 7.6.1
Keywords: report-impact Cc: trevor@…, hvr, ekmett
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Given the common use cases for Data.Bits, it seems strange that there is no instance for Bool. Previously, the Num superclass was a reason not to include one, as there are valid objections to a Num Bool instance. However, this superclass requirement has now been removed, so I think adding a Bits Bool instance would be a good idea.

I have attached a local implementation which I am using, but it may not entirely match the intended semantics of Bits.

Attachments (1)

Bool.hs (375 bytes) - added by Aninhumer 7 years ago.
Bits Bool instance

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Aninhumer

Attachment: Bool.hs added

Bits Bool instance

comment:1 Changed 7 years ago by elliottt

Cc: trevor@… added

comment:2 Changed 7 years ago by igloo

difficulty: Unknown
Resolution: wontfix
Status: newclosed

Thanks for the suggestion. However, library API changes need to be discussed on the libraries list first, and a ticket opened if there is consensus to make the change. Please see for more details.

comment:3 Changed 5 years ago by hvr

Cc: hvr ekmett added
Resolution: wontfix
Status: closednew

This was proposed to the libraries list, see and passed

comment:4 Changed 5 years ago by hvr

Keywords: report-impact added
Milestone: 7.8.1
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.