[GHC] #11057: toIfaceIdDetails trace statement catches PatSynBuilder

GHC ghc-devs at haskell.org
Tue Nov 3 14:54:25 UTC 2015


#11057: toIfaceIdDetails trace statement catches PatSynBuilder
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  mpickering
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * owner:   => mpickering
 * cc: mpickering (added)


Comment:

 Yes, that is wrong.   `PatSynBuilder` is not making it through interface
 files.

 But it's a pain having to track the fact that an Id is in fact a
 `PatSynBuilderId`.  And it's only done for one extremely narrow purpose:
 to service `idConLike` which in turn is only called in `dsExpr` for
 `RecordCon`.  We should not use `IdDetails` for such a narrow reason.

 Let's remove it from `IdDetails` altogether, and get the info from the
 type checker to the desugarer some other way.  What we want is for the
 post-typecheck `RecordCon` to carry `ConLike`, which `tcExpr (RecordCon
 ...)` has in its sticky paw.

 To do this we either need a `PostTc ConLike` field, or a new data
 constructor `RecordConOut`. (Compare `ConPatIn` and `ConPatOut` in
 `HsPat`; the latter has a `ConLike`.)

 Matthew would you like to look at this?

 Simon

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


More information about the ghc-tickets mailing list