[GHC] #13853: TypeApplications and record syntax don't mix
GHC
ghc-devs at haskell.org
Tue Jun 20 16:36:47 UTC 2017
#13853: TypeApplications and record syntax don't mix
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | 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: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by RyanGlScott:
@@ -24,7 +24,0 @@
- λ> (Identity @Int) { runIdentity = 42 }
-
- <interactive>:7:1: error:
- • Couldn't match expected type ‘Identity a0’
- with actual type ‘Int -> Identity Int’
- • In the expression: (Identity @Int) {runIdentity = 42}
- In an equation for ‘it’: it = (Identity @Int) {runIdentity = 42}
New description:
Let's fire up GHCi:
{{{
$ ~/Software/ghc-8.2.0.20170507/bin/ghci
GHCi, version 8.2.0.20170507: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /Users/rscott/.ghci
λ> :set -XTypeApplications -fprint-explicit-foralls
λ> import Data.Functor.Identity
}}}
I can use `TypeApplications` on `Identity` like so:
{{{
λ> Identity @Int 42
Identity 42
}}}
But not if I try to use record syntax:
{{{
λ> Identity @Int { runIdentity = 42 }
<interactive>:4:15: error: parse error on input ‘{’
}}}
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13853#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list