[GHC] #9023: Error when using empty record update on binary pattern synonym

GHC ghc-devs at haskell.org
Thu Jun 5 10:04:09 UTC 2014


#9023: Error when using empty record update on binary pattern synonym
---------------------------------+---------------------------
        Reporter:  Iceland_jack  |            Owner:  cactus
            Type:  bug           |           Status:  patch
        Priority:  normal        |        Milestone:
       Component:  Compiler      |          Version:  7.8.2
      Resolution:                |         Keywords:
Operating System:  Linux         |     Architecture:  x86
 Type of failure:  None/Unknown  |       Difficulty:  Unknown
       Test Case:                |       Blocked By:
        Blocking:                |  Related Tickets:
---------------------------------+---------------------------

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

 In [changeset:"0a55a3cada2fea37586b1a270c1511ed9957dbd4/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="0a55a3cada2fea37586b1a270c1511ed9957dbd4"
 Fix egregious instantiation bug in matchOneConLike (fixing Trac #9023)

 We simply weren't giving anything like the right instantiating types
 to patSynInstArgTys in matchOneConLike.

 To get these instantiating types would have involved matching the
 result type of the pattern synonym with the pattern type, which is
 tiresome.  So instead I changed ConPatOut so that instead of recording
 the type of the *whole* pattern (in old field pat_ty), it not records
 the *instantiating* types (in new field pat_arg_tys).  Then we canuse
 TcHsSyn.conLikeResTy to get the pattern type when needed.

 There are lots of knock-on incidental effects, but they mostly made
 the code simpler, so I'm happy.
 }}}

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


More information about the ghc-tickets mailing list