[GHC] #11385: Unify named wildcards in different type applications
GHC
ghc-devs at haskell.org
Tue Jul 5 17:57:01 UTC 2016
#11385: Unify named wildcards in different type applications
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.1
checker) | Keywords:
Resolution: | NamedWildCards TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I'm assuming your `:: ...` in comment:3 are meant to be inferred, not part
of what the user writes. Then yes. And your final example in comment:3
should most certainly be allowed; if it's not, we've designed the thing
very wrongly.
And I agree with all your examples in comment:4 except, possibly, the
last. But it's probably just simpler to accept the last example along with
the others.
How does this contrast with comment:9:ticket:11350? These are top-level,
whereas those are in an instance declaration. I think it's reasonable to
have slightly different behavior. In both cases, the function body is
interpreted with respect to the user-written type signature for the
function. It's just that, in the instance case, the user-written type
signature isn't really the full story. But I think it's all OK.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11385#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list