[GHC] #11409: Cannot instantiate literals using TypeApplications
GHC
ghc-devs at haskell.org
Wed Mar 22 09:58:19 UTC 2017
#11409: Cannot instantiate literals using TypeApplications
-------------------------------------+-------------------------------------
Reporter: Feuerbach | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.0.1-rc1
Resolution: | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11352 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by Iceland_jack:
Old description:
> {{{
> GHCi, version 8.0.1.20160110: http://www.haskell.org/ghc/ :? for help
> Prelude> :set -XTypeApplications -fprint-explicit-foralls
> Prelude> :t 42
> 42 :: forall {a}. Num a => a
> Prelude> 42 @Int
>
> <interactive>:3:1: error:
> • Cannot not apply expression of type ‘a0’
> to a visible type argument ‘Int’
> • In the expression: 42 @Int
> In an equation for ‘it’: it = 42 @Int
> }}}
>
> (Also, "cannot not" looks like a typo.)
New description:
Relevant
[https://www.reddit.com/r/haskell/comments/60seia/type_application_on_literals/
reddit post].
----
{{{
GHCi, version 8.0.1.20160110: http://www.haskell.org/ghc/ :? for help
Prelude> :set -XTypeApplications -fprint-explicit-foralls
Prelude> :t 42
42 :: forall {a}. Num a => a
Prelude> 42 @Int
<interactive>:3:1: error:
• Cannot not apply expression of type ‘a0’
to a visible type argument ‘Int’
• In the expression: 42 @Int
In an equation for ‘it’: it = 42 @Int
}}}
(Also, "cannot not" looks like a typo.)
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11409#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list