[GHC] #15627: Absent unlifted bindings

GHC ghc-devs at haskell.org
Sun Oct 14 20:05:14 UTC 2018


#15627: Absent unlifted bindings
-------------------------------------+-------------------------------------
        Reporter:  sgraf             |                Owner:  (none)
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:  ⊥
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #9279 #4328       |  Differential Rev(s):  Phab:D5153
  #11126                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Krzysztof Gogolewski <krz.gogolewski@…>):

 In [changeset:"448b77b93b369745e9bfbc8b46a5b87bb73dd379/ghc"
 448b77b9/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="448b77b93b369745e9bfbc8b46a5b87bb73dd379"
 Add RubbishLit for absent bindings of UnliftedRep

 Summary:
 Trac #9279 reminded us that the worker wrapper transformation copes
 really badly with absent unlifted boxed bindings.

 As `Note [Absent errors]` in WwLib.hs points out, we can't just use
 `absentError` for unlifted bindings because there is no bottom to hide
 the error in.
 So instead, we synthesise a new `RubbishLit` of type
 `forall (a :: TYPE 'UnliftedRep). a`, which code-gen may subsitute for
 any boxed value. We choose `()`, so that there is a good chance that
 the program crashes instead instead of leading to corrupt data, should
 absence analysis have been too optimistic (#11126).

 Reviewers: simonpj, hvr, goldfire, bgamari, simonmar

 Reviewed By: simonpj

 Subscribers: osa1, rwbarton, carter

 GHC Trac Issues: #15627, #9279, #4306, #11126

 Differential Revision: https://phabricator.haskell.org/D5153
 }}}

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


More information about the ghc-tickets mailing list