[GHC] #9390: Inlining prevents evaluation of ignored parts of unboxed tuples

GHC ghc-devs at haskell.org
Thu Aug 7 08:55:22 UTC 2014


#9390: Inlining prevents evaluation of ignored parts of unboxed tuples
-------------------------------------+-------------------------------------
              Reporter:  snoyberg    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.8.4
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:  Linux       |     Architecture:  x86_64 (amd64)
       Type of failure:  Incorrect   |       Difficulty:  Unknown
  result at runtime                  |       Blocked By:
             Test Case:              |  Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"ab6480b8d8ea45ae6958558245266153df071aa5/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="ab6480b8d8ea45ae6958558245266153df071aa5"
 Extensive Notes on can_fail and has_side_effects

 In fixing Trac #9390 I discovered that I *still* didn't really understand
 what the can_fail and has_side_effects properties of a PrimOp mean,
 precisely.

 The big new things I learned are

 * has_side_effects needs to be true only of *write* effects,
   Reads (which are, strictly speaking, effects) don't matter here.

 * has_side_effects must be true of primops that can throw a synchronous
   Haskell exception (eg raiseIO#)

 * can_fail is true only of primops that can cause an *unchecked* (not
   Haskell) system exception, like divide by zero, or accessing memory
   out of range through an array read or write.

 I've documented all this now.  The changes in this patch are only
 in comments.
 }}}

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


More information about the ghc-tickets mailing list