-ddump-splices does not parenthesize visible type applications correctly
So many -ddump-splices bugs...
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -ddump-splices #-}
module Bug where
import Data.Proxy
$([d| f :: Proxy (Int -> Int)
f = Proxy @(Int -> Int)
|])
$ /opt/ghc/8.6.1/bin/ghci Bug.hs
GHCi, version 8.6.0.20180627: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
Bug.hs:(8,3)-(10,6): Splicing declarations
[d| f_a1Dg :: Proxy (Int -> Int)
f_a1Dg = Proxy @(Int -> Int) |]
======>
f_a4tx :: Proxy (Int -> Int)
f_a4tx = Proxy @Int -> Int
Ack—Proxy @Int -> Int should actually be Proxy @(Int -> Int).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |