[GHC] #11947: GHC mistakenly warns about type defaulting in the presence of -XTypeApplications
GHC
ghc-devs at haskell.org
Mon Apr 18 14:15:58 UTC 2016
#11947: GHC mistakenly warns about type defaulting in the presence of
-XTypeApplications
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) | Keywords:
Resolution: | TypeApplications
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
I suppose this is correct, but it hardly feels intuitive to me. The
definition of `theFloatDigits`, as written above, doesn't seem ambiguous
at all, given that we are explicitly applying the type `a` to `undefined`.
The fact that GHC is emitting a warning at all appears to be byproduct of
the particular implementation it uses to check for ambiguity.
That being said, it looks like option 2 would be the most sensible option?
I can't envision a scenario in which not defaulting types in an ambiguity
check would make a difference.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11947#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list