[GHC] #10359: Tuple constraint synonym led to asymptotic performance lossage

GHC ghc-devs at haskell.org
Wed Apr 29 16:12:48 UTC 2015


#10359: Tuple constraint synonym led to asymptotic performance lossage
-------------------------------------+-------------------------------------
        Reporter:  axch              |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.6.3
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  Runtime           |  (amd64)
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Ah I see. Well that rules out using record update.

 What happens if you simulate tuple predicates, thus:
 {{{
 class (Fractional a, Real a) => Numerical a
 instance (Fractional a, Real a) => Numerical a
 }}}
 I think that'll work.  You need `FlexibleInstances`,
 `UndecidableInstances`.

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


More information about the ghc-tickets mailing list