
#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