diff options
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r-- | src/Haddock/Convert.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index b5b905e7..7c9a2ee5 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -20,6 +20,7 @@ module Haddock.Convert where import HsSyn import TcType ( tcSplitTyConApp_maybe, tcSplitSigmaTy ) import TypeRep +import Type(isStrLitTy) import Kind ( splitKindFunTys, synTyConResKind ) import Name import Var @@ -29,6 +30,7 @@ import DataCon import BasicTypes ( TupleSort(..) ) import TysPrim ( alphaTyVars ) import TysWiredIn ( listTyConName, eqTyCon ) +import PrelNames (ipClassName) import Bag ( emptyBag ) import SrcLoc ( Located, noLoc, unLoc ) import Data.List( partition ) @@ -275,9 +277,10 @@ synifyType _ (TyConApp tc tys) | getName tc == listTyConName, [ty] <- tys = noLoc $ HsListTy (synifyType WithinType ty) -- ditto for implicit parameter tycons - | Just ip <- tyConIP_maybe tc - , [ty] <- tys - = noLoc $ HsIParamTy ip (synifyType WithinType ty) + | tyConName tc == ipClassName + , [name, ty] <- tys + , Just x <- isStrLitTy name + = noLoc $ HsIParamTy (HsIPName x) (synifyType WithinType ty) -- and equalities | tc == eqTyCon , [ty1, ty2] <- tys |