[GHC] #10858: Smaller generated Ord instances

GHC ghc-devs at haskell.org
Wed Sep 9 08:32:49 UTC 2015


#10858: Smaller generated Ord instances
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                   Owner:
            Type:  task              |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #9557             |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I'm not following the details here but:
  * I think it's an excellent idea to use `thenCmp` (will dramatically
 simplify the output of `-ddump-deriv`)
  * But I suspect it won't make a lot of difference in the end, because GHC
 will probably inline `thenCmp`!

 But what is stranger to me is this: why don't we just derive the code for
 `compare`, and use the default methods for `(>)`, `(==)` etc?

 Simon

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


More information about the ghc-tickets mailing list