Skip to content
Snippets Groups Projects
Commit bf9da9cd authored by Alec Theriault's avatar Alec Theriault
Browse files

Handle promoted tuples in 'synifyType'

When we have a fully applied promoted tuple, we can expand it out properly.
parent b4172717
No related branches found
No related tags found
No related merge requests found
......@@ -458,6 +458,10 @@ synifyType _ (TyConApp tc tys)
UnboxedTuple -> HsUnboxedTuple)
(map (synifyType WithinType) vis_tys)
| isUnboxedSumTyCon tc = noLoc $ HsSumTy noExt (map (synifyType WithinType) vis_tys)
| Just dc <- isPromotedDataCon_maybe tc
, isTupleDataCon dc
, dataConSourceArity dc == length vis_tys
= noLoc $ HsExplicitTupleTy noExt (map (synifyType WithinType) vis_tys)
-- ditto for lists
| getName tc == listTyConName, [ty] <- tys =
noLoc $ HsListTy noExt (synifyType WithinType ty)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment