[GHC] #5296: Add explicit type applications
GHC
ghc-devs at haskell.org
Wed Mar 2 21:57:58 UTC 2016
#5296: Add explicit type applications
-------------------------------------+-------------------------------------
Reporter: dsf | Owner: goldfire
Type: feature request | Status: closed
Priority: low | Milestone: 8.0.1
Component: Compiler (Type | Version: 7.0.3
checker) |
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: GHC rejects | Test Case:
valid program | typecheck/should_compile/Vta{1,2}
| typecheck/should_fail/VtaFail
Blocked By: 1897 | Blocking: 10770
Related Tickets: #4466 | Differential Rev(s): Phab:D1681
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
It depends on what ambiguity means. In a language with visible type
application,
{{{
foo :: (Show a, Read a) => String -> String
}}}
can be called quite easily. Thus the ambiguity check seems unhelpful here.
Thus the decision to have `TypeApplications` turn on
`AllowAmbiguousTypes`.
I do see what you're getting at. Perhaps this is the wrong design, and I'm
happy to think about changing it (although it does seem a bit late). I
will say that if you do want the ambiguity check, you can always use
`NoAllowAmbiguousTypes`.
If you wish to pursue the issue, I think a good next step is posting to
ghc-devs to see what others think.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5296#comment:30>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list