[GHC] #13401: GHCi gives conflicting information about visible type application
GHC
ghc-devs at haskell.org
Thu Mar 9 19:44:56 UTC 2017
#13401: GHCi gives conflicting information about visible type application
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.1
Resolution: | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11376, #11975 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by crockeea):
The reason I feel that GHCi is giving me incorrect info is due to the
existing documentation that I quoted above. Basically, my understanding is
that if `foo :: forall {k} . k` then GHCi should throw an error if I try
to write `foo @Int`, and if `foo :: forall k . k`, then GHCi should
happily accept `foo @Int`.
When I see `foo :: forall {k} . k`, but GHCi also lets me write `foo
@Int`, I have no idea what it means by `{k}`. This seems like a
contradiction. I get the impression from your comments that there's
something more subtle going on here that I don't understand. If you think
others might have the same misconception as me, I would encourage you to
improve the existing docs as well.
In regards to your suggestion, I think it would be good to put a blurb in
the Visible Type Application section (9.18 by my count) as well, near the
"detail" note that explains the curly braces.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13401#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list