Custom Query (6603 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 6603)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#7424 wontfix Add Data.Bits instance for Bool Aninhumer
Description

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.

#7425 wontfix Add method to Data.Bits for creating zeroed values. Aninhumer
Description

The removal of the Num superclass from Data.Bits now means there is no simple way to create a value in which all bits are set to zero. There are obviously a variety of ways such a value can be constructed with the existing methods, but nonetheless it seems like an odd omission.

The new method could be given an implementation in terms of the existing ones for backwards compatibility.

#7532 fixed -ddump-splices output doesn't match generated code for data instances inside instances. Aninhumer
Description

Using the following code:

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}

module Test where

import Language.Haskell.TH

class C a where
    data D a

bang :: DecsQ
bang = return [
    InstanceD [] (AppT (ConT ''C) (ConT ''Int)) [
        DataInstD [] ''D [ConT ''Int] [
            NormalC (mkName "T") []] []]]
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}

import Language.Haskell.TH
import Test

$(bang)

When compiling the second file in GHCi with -ddump-splices set, the output is:

th-test2.hs:1:1: Splicing declarations
    bang
  ======>
    th-test2.hs:9:3-6
    instance C Int where
      data instance D Int = T
Ok, modules loaded: Test, Main.

This compiles successfully, but the dumped splice is clearly incorrect (which I confirmed by attempting to splice this code manually into the same place).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.