Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-11-30 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
---+
  Reporter:  dreixel   |  Owner:  
  Type:  bug   | Status:  closed  
  Priority:  normal|  Milestone:  7.8.1   
 Component:  Compiler  |Version:  7.6.1   
Resolution:  fixed |   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+
Changes (by igloo):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Ah, great. I've applied it. Thanks!

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-11-30 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
---+
  Reporter:  dreixel   |  Owner:  
  Type:  bug   | Status:  new 
  Priority:  normal|  Milestone:  7.8.1   
 Component:  Compiler  |Version:  7.6.1   
Resolution:|   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+

Comment(by dreixel):

 There was no opinion:
 http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/18099

 I was going to proceed and patch.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-11-30 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
---+
  Reporter:  dreixel   |  Owner:  
  Type:  bug   | Status:  new 
  Priority:  normal|  Milestone:  7.8.1   
 Component:  Compiler  |Version:  7.6.1   
Resolution:|   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+
Changes (by igloo):

  * owner:  dreixel =>
  * status:  patch => new


Comment:

 Removing patch tag until libraries@ has given an opinion.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-10-16 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
-+--
Reporter:  dreixel   |   Owner:  dreixel 
Type:  bug   |  Status:  patch   
Priority:  normal|   Milestone:  7.8.1   
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by igloo):

  * milestone:  => 7.8.1


Comment:

 Replying to [comment:3 dreixel]:
 >
 > Shall I go ahead and push the patch?

 Probably worth asking on libraries@, to give people the chance to object.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-10-09 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
-+--
Reporter:  dreixel   |   Owner:  dreixel 
Type:  bug   |  Status:  patch   
Priority:  normal|   Milestone:  
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by igloo):

  * status:  infoneeded => patch


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-09-21 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
-+--
Reporter:  dreixel   |   Owner:  dreixel 
Type:  bug   |  Status:  infoneeded  
Priority:  normal|   Milestone:  
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by dreixel):

  * status:  new => infoneeded


Comment:

 Here's the fix:

 {{{
 diff --git a/Data/Data.hs b/Data/Data.hs
 index 0a29668..cb2d894 100644
 --- a/Data/Data.hs
 +++ b/Data/Data.hs
 @@ -1275,27 +1275,27 @@ instance (Data a, Data b, Data c, Data d, Data e,
 Data f

 --

 -instance Typeable a => Data (Ptr a) where
 +instance (Data a, Typeable a) => Data (Ptr a) where
toConstr _   = error "Data.Data.toConstr(Ptr)"
gunfold _ _  = error "Data.Data.gunfold(Ptr)"
dataTypeOf _ = mkNoRepType "GHC.Ptr.Ptr"
 -
 +  dataCast1 x  = gcast1 x

 --

 -instance Typeable a => Data (ForeignPtr a) where
 +instance (Data a, Typeable a) => Data (ForeignPtr a) where
toConstr _   = error "Data.Data.toConstr(ForeignPtr)"
gunfold _ _  = error "Data.Data.gunfold(ForeignPtr)"
dataTypeOf _ = mkNoRepType "GHC.ForeignPtr.ForeignPtr"
 -
 +  dataCast1 x  = gcast1 x

 --
  -- The Data instance for Array preserves data abstraction at the cost of
  -- inefficiency. We omit reflection services for the sake of data
 abstraction.
 -instance (Typeable a, Data b, Ix a) => Data (Array a b)
 +instance (Typeable a, Data a, Data b, Ix a) => Data (Array a b)
   where
gfoldl f z a = z (listArray (bounds a)) `f` (elems a)
toConstr _   = error "Data.Data.toConstr(Array)"
gunfold _ _  = error "Data.Data.gunfold(Array)"
dataTypeOf _ = mkNoRepType "Data.Array.Array"
 -
 +  dataCast2 x  = gcast2 x
 }}}

 Note however that this requires adding additional `Data` constraints to
 these instances; perhaps this is the reason why these methods were omitted
 in the first place. So fixing this might break client code that uses these
 instances. Nonetheless, they are required for the correct behavior of
 SYB's `ext/1/2` functions.

 Shall I go ahead and push the patch?

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-09-20 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
-+--
Reporter:  dreixel   |   Owner:  dreixel 
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--

Comment(by dreixel):

 Yes, I'll take care of this, it's trivial.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7256: Missing dataCast1 and dataCast2 methods in Data.Data instances

2012-09-20 Thread GHC
#7256: Missing dataCast1 and dataCast2 methods in Data.Data instances
-+--
Reporter:  dreixel   |   Owner:  dreixel 
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by simonpj):

  * difficulty:  => Unknown


Comment:

 Any chance of a patch?  Sounds as if you know just what to do.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs