summaryrefslogtreecommitdiff
path: root/compiler/hsSyn/Convert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/hsSyn/Convert.hs')
-rw-r--r--compiler/hsSyn/Convert.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs
index 06d5d6ca7a..8bd33d6a5b 100644
--- a/compiler/hsSyn/Convert.hs
+++ b/compiler/hsSyn/Convert.hs
@@ -1350,7 +1350,7 @@ cvtTypeKind ty_str ty
-- names, as opposed to PromotedT, which can only
-- contain data constructor names. See #15572.
let prom = if isRdrDataCon nm'
- then Promoted
+ then IsPromoted
else NotPromoted
; mk_apps (HsTyVar noExt prom (noLoc nm')) tys'}
@@ -1398,8 +1398,8 @@ cvtTypeKind ty_str ty
}
PromotedT nm -> do { nm' <- cName nm
- ; mk_apps (HsTyVar noExt Promoted
- (noLoc nm')) tys' }
+ ; let hs_ty = HsTyVar noExt IsPromoted (noLoc nm')
+ ; mk_apps hs_ty tys' }
-- Promoted data constructor; hence cName
PromotedTupleT n
@@ -1408,20 +1408,20 @@ cvtTypeKind ty_str ty
| m == n -- Saturated
-> returnL (HsExplicitTupleTy noExt tys')
| otherwise
- -> mk_apps (HsTyVar noExt Promoted
+ -> mk_apps (HsTyVar noExt IsPromoted
(noLoc (getRdrName (tupleDataCon Boxed n)))) tys'
where
m = length tys'
PromotedNilT
- -> mk_apps (HsExplicitListTy noExt Promoted []) tys'
+ -> mk_apps (HsExplicitListTy noExt IsPromoted []) tys'
PromotedConsT -- See Note [Representing concrete syntax in types]
-- in Language.Haskell.TH.Syntax
| [ty1, L _ (HsExplicitListTy _ ip tys2)] <- tys'
-> returnL (HsExplicitListTy noExt ip (ty1:tys2))
| otherwise
- -> mk_apps (HsTyVar noExt Promoted
+ -> mk_apps (HsTyVar noExt IsPromoted
(noLoc (getRdrName consDataCon)))
tys'