Verified Commit 707826df authored by Camil Staps's avatar Camil Staps 🙂

Fix indentation

parent 33e6f910
......@@ -674,34 +674,35 @@ where
++ [(i.pi_ident.id_name, i.pi_types, i.pi_pos) \\ PD_Instances pis <- defs, {pim_pi=i} <- pis]
pd_classes :: !Bool ![ParsedDefinition] !CollectedComments -> [(LocationInModule, 'Cloogle.DB'.ClassEntry, [(String, 'Cloogle.DB'.FunctionEntry, 'Data.Set'.Set String)])]
pd_classes dcl defs comments
= [ let
typespecs = pd_typespecs True clsdefs comments
macros = [(n,(r,ids)) \\ ({LocationInModule | name=Just n},{fe_representation=Just r},ids) <- pd_rewriterules dcl clsdefs comments]
updateRepresentation n fe
= { fe
& fe_kind=if (isNothing $ lookup n macros) fe.fe_kind Macro
, fe_representation=(fst <$> lookup n macros) <|> fe.fe_representation
, fe_documentation=if (isSingleFunction typespecs id)
((\d -> {FunctionDoc | d & vars=[]}) <$> findDoc hideIsUsedReturn pd comments)
fe.fe_documentation
}
members = [(f,updateRepresentation f et,ids) \\ ({LocationInModule | name=Just f}, et, ids) <- typespecs]
in ( setLine dcl class_pos {LocationInModule | zero & name=Just id_name}
, 'Cloogle.DB'.toClass
NoLocation
(map 'Clean.Types'.toTypeVar class_args)
(all (\(_,fe,_) -> fe.fe_kind == Macro) members)
('Clean.Types'.TypeContext
pd_classes dcl defs comments =
[
( setLine dcl class_pos {LocationInModule | zero & name=Just id_name}
, 'Cloogle.DB'.toClass
NoLocation
(map 'Clean.Types'.toTypeVar class_args)
(all (\(_,fe,_) -> fe.fe_kind == Macro) members)
('Clean.Types'.TypeContext
[ tr
\\ 'Clean.Types'.TypeContext tc <- map 'Clean.Types'.toTypeContext class_context
, tr <- tc
])
(parseClassDoc typespecs pd comments)
, members
)
\\ pd=:(PD_Class {class_ident=id=:{id_name},class_pos,class_args,class_context} clsdefs) <- defs
]
(parseClassDoc typespecs pd comments)
, members
)
\\ pd=:(PD_Class {class_ident=id=:{id_name},class_pos,class_args,class_context} clsdefs) <- defs
, let
typespecs = pd_typespecs True clsdefs comments
macros = [(n,(r,ids)) \\ ({LocationInModule | name=Just n},{fe_representation=Just r},ids) <- pd_rewriterules dcl clsdefs comments]
updateRepresentation n fe =
{ fe
& fe_kind=if (isNothing $ lookup n macros) fe.fe_kind Macro
, fe_representation=(fst <$> lookup n macros) <|> fe.fe_representation
, fe_documentation=if (isSingleFunction typespecs id)
((\d -> {FunctionDoc | d & vars=[]}) <$> findDoc hideIsUsedReturn pd comments)
fe.fe_documentation
}
members = [(f,updateRepresentation f et,ids) \\ ({LocationInModule | name=Just f}, et, ids) <- typespecs]
]
where
// When the class has one member with the same name as the class, use
// the class documentation as the function's documentation. This is the
......
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