[GHC] #9795: Debug.Trace.trace is too strict

GHC ghc-devs at haskell.org
Fri Feb 13 19:30:00 UTC 2015


#9795: Debug.Trace.trace is too strict
-------------------------------------+-------------------------------------
        Reporter:  jcpetruzza        |                   Owner:
            Type:  bug               |                  Status:  patch
        Priority:  normal            |               Milestone:  7.12.1
       Component:  libraries/base    |                 Version:  7.8.3
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D654
-------------------------------------+-------------------------------------
Changes (by rwbarton):

 * cc: thomie (added)


Comment:

 The underlying problem has to do with how the strictness analyzer treats
 FFI calls (maybe just unsafe ones): `c_function >> y` is considered to be
 strict in `y`.

 I consider this to be a bug (as seen here: what if `c_function` has some
 externally visible effect?) but I'm concerned that fixing it might have
 bad effects on performance in other settings.

 I think it's effectively just luck that we don't see the same behavior
 with `hPutStrLn stderr s`: `hPutStrLn` is too complicated for the
 strictness analyser.

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


More information about the ghc-tickets mailing list