[GHC] #11376: Inconsistent specified type variables among functions and datatypes/classes when using -XTypeApplications
GHC
ghc-devs at haskell.org
Mon Apr 4 21:36:34 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 goldfire):
Specificity is indeed specialized. However, the problematic output from
`:type` that your patch fixes will happen only with visible type
application. So, we're already focusing on a specialized audience.
I could live with your last proposal -- that `:type <identifier>` is,
essentially, a separate command from the normal `:type`. But how long will
it be until someone posts a bug report complaining that `:t (blah)` is
different from `:t blah`? This is the sort of "computer trying to be
smart" behavior that I find so irritating in a variety of programs. It is
indeed possible (and easy) to specify, but that specification will be
buried in some bullet in the manual.
What this all boils down to is that we really do need two commands: One
that gives the raw, uninstantiated type; and one that tells us what type
an identifier would be inferred to have if assigned to an expression.
These are different, and both are useful! So maybe we should just
introduce a new command. `:type` should clearly have the instantiated
behavior, and the new one can be uninstantiated. I'm uninspired about the
name of the new command.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11376#comment:33>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list