[GHC] #9778: Namespace collision detection for promoted types

GHC ghc-devs at haskell.org
Thu Nov 6 17:02:07 UTC 2014


#9778: Namespace collision detection for promoted types
-------------------------------------+-------------------------------------
              Reporter:  crockeea    |            Owner:
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.8.3
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by kosmikus):

 But what if you mean the datatype `S` and not the promoted constructor? If
 you report an ambiguity error, we would need a way to disambiguate the
 other way as well, and we currently cannot.

 I guess the kind error you're getting now could in addition include a hint
 that there's an ambiguity, though, something like
 {{{
 Foo.hs:12:8:
     ‘S’ is applied to too many type arguments
     In the type signature for ‘foo’: foo :: S n -> S n
     (Hint: did you mean the promoted constructor 'S?)
 }}}

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


More information about the ghc-tickets mailing list