Verified Commit 0ef3243d authored by Camil Staps's avatar Camil Staps 🙂

In mergeTypeDefEntries, prefer the dcl type (to store abstract synonyms correctly, for example)

parent 1bdd9499
......@@ -228,7 +228,7 @@ mergeTypeDefEntries :: !TypeDefEntry !TypeDefEntry -> TypeDefEntry
mergeTypeDefEntries a=:{tde_typedef={td_rhs=TDRAbstract Nothing}} b = case b.tde_typedef.td_rhs of
TDRAbstract _ -> a
rhs -> {a & tde_typedef.td_rhs=TDRAbstract (Just rhs)}
mergeTypeDefEntries a b = b
mergeTypeDefEntries a b = a
toClass :: !Location ![String] !Bool !TypeContext !(Maybe ClassDoc) -> ClassEntry
toClass loc vs meta cc doc =
......
......@@ -712,7 +712,9 @@ where
( setLine dcl ptd.td_pos {LocationInModule | zero & name=Just name}
, 'Cloogle.DB'.toTypeDefEntry NoLocation td $ Just $ findRhsDoc ptd $ fromMaybe gDefault{|*|} $
findDoc (const True) pd comments
) \\ pd=:(PD_Type ptd) <- defs, td <- ['Clean.Types'.toTypeDef ptd]]
) \\ pd=:(PD_Type ptd) <- defs
, let td = 'Clean.Types'.toTypeDef ptd
]
where
findRhsDoc :: !ParsedTypeDef -> TypeDoc -> TypeDoc
findRhsDoc {td_rhs=ConsList cs} = addConses cs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment