[GHC] #14254: The Binary instance for TypeRep smells a bit expensive

GHC ghc-devs at haskell.org
Thu Oct 26 08:27:54 UTC 2017


#14254: The Binary instance for TypeRep smells a bit expensive
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  Typeable
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14337            |  Differential Rev(s):  Phab:D3998,
       Wiki Page:                    |  Phab:D4082, Phab:D4085
-------------------------------------+-------------------------------------

Comment (by simonpj):

 All this is re Phab:D4085.

 > I don't need the cache field to be strict. I just need to force values
 before installing them in that field,

 Right: and that happens in the "smart constructor", `mkTrApp`.

 Doesn't the plan in comment:14 work?  Just spot the special case in
 `mkTrApp`; and call `mkTrApp` whenever constructing a `TrApp`.

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


More information about the ghc-tickets mailing list