[GHC] #11376: Inconsistent specified type variables among functions and datatypes/classes when using -XTypeApplications

GHC ghc-devs at haskell.org
Mon Apr 4 21:20:04 UTC 2016


#11376: Inconsistent specified type variables among functions and datatypes/classes
when using -XTypeApplications
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |             Keywords:
      Resolution:                    |  TypeApplications
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I see what you mean about `:info`, but

 * Your `Proxy` example is complicated by the fact that it's a type
 constructor as well as a data constructor

 * The specificity of a type is a pretty specialised topic.  I myself still
 uncomfortable with the idea of having ''three'' different levels of
 specificity (visible, specified, invisible).  It only makes a difference
 when you have visible type application.  Most programmers (pre GHC 8.0,
 100% of them) will neither know nor care.

 * So we should not make simple things more complicated in the service of
 specificity.  I really don't want `:type` to display two types!!

 * I could live with `:type` having special behaviour for a bare variable:
 namely display its un-instantiated type.  So `:type x` and `:type (x)`
 might display different things, but that is easy to specify and most often
 is what you want.

 (I do wonder whether we should print all the instance of a type/class by
 default, or whether `:instances` should do that. But that's another
 question.)

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


More information about the ghc-tickets mailing list