[GHC] #11790: (More) missing instances for Identity and Const

#11790: (More) missing instances for Identity and Const -------------------------------------+------------------------------------- Reporter: duairc | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.10.3 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): D2079 | Wiki Page: -------------------------------------+------------------------------------- I made a similar ([https://ghc.haskell.org/trac/ghc/ticket/11210 #11210]) issue a few months ago and submitted a [https://phabricator.haskell.org/D1626 patch] which was accepted. There are some more instances I want to add: {{{ instance Num a => Num (Identity a) instance Real a => Real (Identity a) instance Integral a => Integral (Identity a) instance Fractional a => Fractional (Identity a) instance Floating a => Floating (Identity a) instance RealFrac a => RealFrac (Identity a) instance RealFloat a => RealFloat (Identity a) instance Bits a => Bits (Identity a) instance FiniteBits a => FiniteBits (Identity a) instance IsString => IsString (Identity a) instance Num a => Num (Const a b) instance Real a => Real (Const a b) instance Integral a => Integral (Const a b) instance Fractional a => Fractional (Const a b) instance Floating a => Floating (Const a b) instance RealFrac a => RealFrac (Const a b) instance RealFloat a => RealFloat (Const a b) instance Bits a => Bits (Const a b) instance FiniteBits a => FiniteBits (Const a b) instance IsString => IsString (Const a b) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11790 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11790: (More) missing instances for Identity and Const -------------------------------------+------------------------------------- Reporter: duairc | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2079 Wiki Page: | -------------------------------------+------------------------------------- Changes (by duairc): * differential: D2079 => Phab:D2079 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11790#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11790: (More) missing instances for Identity and Const -------------------------------------+------------------------------------- Reporter: duairc | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2079 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: core-libraries-committe (added) * type: bug => feature request @@ -6,1 +6,1 @@ - {{{ + {{{#!hs New description: I made a similar ([https://ghc.haskell.org/trac/ghc/ticket/11210 #11210]) issue a few months ago and submitted a [https://phabricator.haskell.org/D1626 patch] which was accepted. There are some more instances I want to add: {{{#!hs instance Num a => Num (Identity a) instance Real a => Real (Identity a) instance Integral a => Integral (Identity a) instance Fractional a => Fractional (Identity a) instance Floating a => Floating (Identity a) instance RealFrac a => RealFrac (Identity a) instance RealFloat a => RealFloat (Identity a) instance Bits a => Bits (Identity a) instance FiniteBits a => FiniteBits (Identity a) instance IsString => IsString (Identity a) instance Num a => Num (Const a b) instance Real a => Real (Const a b) instance Integral a => Integral (Const a b) instance Fractional a => Fractional (Const a b) instance Floating a => Floating (Const a b) instance RealFrac a => RealFrac (Const a b) instance RealFloat a => RealFloat (Const a b) instance Bits a => Bits (Const a b) instance FiniteBits a => FiniteBits (Const a b) instance IsString => IsString (Const a b) }}} -- Comment: It would be nice to get approval from the CLC on this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11790#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11790: (More) missing instances for Identity and Const
-------------------------------------+-------------------------------------
Reporter: duairc | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2079
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11790: (More) missing instances for Identity and Const -------------------------------------+------------------------------------- Reporter: duairc | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: libraries/base | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2079 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.0.1 Comment: Thanks Shane! Merged to `ghc-8.0` as 7b8beba76a31b3184413e033c6f86a5dd6c70ac7. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11790#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC