This repository was archived by the owner on Aug 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
haddock-api/src/Haddock/Backends Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,14 @@ ppCtor dflags dat subdocs con@ConDeclH98 {}
266
266
-- docs for con_names on why it is a list to begin with.
267
267
name = commaSeparate dflags . map unL $ getConNames con
268
268
269
- resType = apps $ map (reL . HsTyVar NoExt NotPromoted . reL) $
270
- (tcdName dat) : [hsTyVarName v | L _ v@ (UserTyVar _ _) <- hsQTvExplicit $ tyClDeclTyVars dat]
269
+ resType = let c = HsTyVar NoExt NotPromoted (noLoc (tcdName dat))
270
+ as = map (tyVarBndr2Type . unLoc) (hsQTvExplicit $ tyClDeclTyVars dat)
271
+ in apps (map noLoc (c : as))
272
+
273
+ tyVarBndr2Type :: HsTyVarBndr GhcRn -> HsType GhcRn
274
+ tyVarBndr2Type (UserTyVar _ n) = HsTyVar NoExt NotPromoted n
275
+ tyVarBndr2Type (KindedTyVar _ n k) = HsKindSig NoExt (noLoc (HsTyVar NoExt NotPromoted n)) k
276
+ tyVarBndr2Type (XTyVarBndr _) = panic " haddock:ppCtor"
271
277
272
278
ppCtor dflags _dat subdocs con@ (ConDeclGADT { })
273
279
= concatMap (lookupCon dflags subdocs) (getConNames con) ++ f
Original file line number Diff line number Diff line change
1
+ -- Hoogle documentation, generated by Haddock
2
+ -- See Hoogle, http://www.haskell.org/hoogle/
3
+
4
+ @package test
5
+ @version 0.0.0
6
+
7
+ module Bug992
8
+ data K (m :: * -> *)
9
+ K :: K (m :: * -> *)
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE KindSignatures #-}
2
+
3
+ module Bug992 where
4
+
5
+ data K (m :: * -> * ) = K
You can’t perform that action at this time.
0 commit comments