Commit 68357020 authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari

Permit conversion of partially applied PromotedTupleTs

We were simply missing a case in `Convert` for when have a
`PromotedTupleT` that wasn't fully saturated. Easily fixed.

Test Plan: make test TEST=T14843

Reviewers: goldfire, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #14843

Differential Revision:
parent e4dcebf8
......@@ -1301,6 +1301,9 @@ cvtTypeKind ty_str ty
-> do { let kis = replicate m placeHolderKind
; returnL (HsExplicitTupleTy kis tys')
| otherwise
-> mk_apps (HsTyVar NotPromoted
(noLoc (getRdrName (tupleDataCon Boxed n)))) tys'
m = length tys'
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
module T14843 where
import Language.Haskell.TH.Syntax
type T1 = $(return (PromotedTupleT 2))
type T2 = $([t| '(,) |])
type T3 = $(return (PromotedT (tupleDataName 2)))
......@@ -400,3 +400,4 @@ test('T14060', normal, compile_and_run, ['-v0'])
test('T14646', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T14681', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T14817', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T14843', normal, compile, ['-v0'])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment