Commit 57733978 authored by Ryan Scott's avatar Ryan Scott

Parenthesize rank-n contexts in Convert

Summary: A simple oversight.

Test Plan: make test TEST=T15324

Reviewers: goldfire, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15324

Differential Revision: https://phabricator.haskell.org/D4910
parent 92751866
......@@ -1283,7 +1283,9 @@ cvtTypeKind ty_str ty
x'' <- case x' of
L _ HsFunTy{} -> returnL (HsParTy noExt x')
L _ HsForAllTy{} -> returnL (HsParTy noExt x')
-- #14646
-- #14646
L _ HsQualTy{} -> returnL (HsParTy noExt x')
-- #15324
_ -> return x'
returnL (HsFunTy noExt x'' y')
| otherwise ->
......
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module T15324 where
$([d| f :: forall a. (Show a => a) -> a
f _ = undefined
|])
T15324.hs:(5,3)-(7,6): Splicing declarations
[d| f :: forall a. (Show a => a) -> a
f _ = undefined |]
======>
f :: forall a. (Show a => a) -> a
f _ = undefined
......@@ -416,3 +416,4 @@ test('T14885b', normal, compile, [''])
test('T14885c', normal, compile, [''])
test('T15243', normal, compile, ['-dsuppress-uniques'])
test('T15321', normal, compile_fail, [''])
test('T15324', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment