diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-12-23 10:23:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-23 10:23:20 -0500 |
commit | 7dd0a79cce7c4c048e7c145c9f378da3a96392d0 (patch) | |
tree | 30d9449b76bd90bae0030651e839e7f98cada91f /haddock-api/src/Haddock/Convert.hs | |
parent | ed43757aa371f9a532665783e27cff1703b4ac90 (diff) |
Properly synify and render promoted type variables (#985)
* Synify and render properly promoted type variables
Fixes #923.
* Accept output
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r-- | haddock-api/src/Haddock/Convert.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs index 5ddc9eef..291af8de 100644 --- a/haddock-api/src/Haddock/Convert.hs +++ b/haddock-api/src/Haddock/Convert.hs @@ -500,9 +500,10 @@ synifyType _ (TyConApp tc tys) tys_rest -- Most TyCons: | otherwise - = mk_app_tys (HsTyVar noExt NotPromoted $ noLoc (getName tc)) + = mk_app_tys (HsTyVar noExt prom $ noLoc (getName tc)) vis_tys where + prom = if isPromotedDataCon tc then IsPromoted else NotPromoted mk_app_tys ty_app ty_args = foldl (\t1 t2 -> noLoc $ HsAppTy noExt t1 t2) (noLoc ty_app) |