[GHC] #15185: Enum instance for IntX / WordX are inefficient

GHC ghc-devs at haskell.org
Mon Feb 4 10:47:46 UTC 2019


#15185: Enum instance for IntX / WordX are inefficient
-------------------------------------+-------------------------------------
        Reporter:  guibou            |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.10.1
       Component:  Core Libraries    |              Version:  8.4.2
      Resolution:                    |             Keywords:  Newcomer
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4820
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by AndreasK):

 * keywords:   => Newcomer


Comment:

 The efficient implementation comes from `libraries/base/GHC/Enum.hs` where
 rules are defined.

 Implementing this should just be a matter of copying this approach for the
 other Int/Word variants.

 The correct place to put the rules for the Int/Word variants would be
 GHC.Int/GHC.Word in base.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15185#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list