[GHC] #13905: ApplicativeDo is too strict with newtype patterns

GHC ghc-devs at haskell.org
Fri Jun 30 17:27:15 UTC 2017


#13905: ApplicativeDo is too strict with newtype patterns
-------------------------------------+-------------------------------------
           Reporter:  dfeuer         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.4.1
          Component:  Compiler       |           Version:  8.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  GHC rejects
  Unknown/Multiple                   |  valid program
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The fix to #13875 went a little too far, and interprets newtype
 constructor patterns as strict. It's not clear to me how to fix this, as
 the `Name` of the constructor doesn't seem to give any clue as to whether
 it is a newtype constructor or a data constructor. The comment at the top
 of `basicTypes/Name.hs` indicates

 {{{
 -- *  'Name.Name' is the type of names that have had their scoping and
 binding resolved. They
 --   have an 'OccName.OccName' but also a 'Unique.Unique' that
 disambiguates Names that have
 --   the same 'OccName.OccName' and indeed is used for all 'Name.Name'
 comparison. Names
 --   also contain information about where they originated from, see
 "Name#name_sorts"
 }}}

 which suggests that this information should be available, but I don't know
 what's involved in propagating it to the right place.

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


More information about the ghc-tickets mailing list