[GHC] #11947: GHC mistakenly warns about type defaulting in the presence of -XTypeApplications
GHC
ghc-devs at haskell.org
Mon Apr 18 15:05:04 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):
Replying to [comment:5 goldfire]:
> But you should get no warning with `-XAllowAmbiguousTypes`, as that
skips the ambiguity check that causes the warning. Or am I mistaken here?
You do get a warning, it seems:
{{{
$ /opt/ghc/8.0.1/bin/runghc -Wall -XAllowAmbiguousTypes TheFloatDigits.hs
TheFloatDigits.hs:6:19: warning: [-Wtype-defaults]
• Defaulting the following constraint to type ‘Double’ RealFloat a0
• In the ambiguity check for ‘theFloatDigits’
In the type signature:
theFloatDigits :: forall a. RealFloat a => Int
(53,24)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11947#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list