Verified Commit 09554a89 authored by Camil Staps's avatar Camil Staps 🚀

Added missing toString case; documentation for hidden abstract types

parent 8e48ea44
Subproject commit ca78ae6f4745e33b5b47a4e197bcb5d4ab65145f
Subproject commit 0f4489e1bba29cf4bc468758a5b523e6fa5485b3
......@@ -41,7 +41,8 @@ from syntax import :: ClassDef{class_args,class_context,class_ident,class_pos},
:: ParsedExpr, :: ParsedInstance{pi_ident,pi_pos,pi_types},
:: ParsedInstanceAndMembers{pim_pi}, :: ParsedModule, :: ParsedTypeDef,
:: Position(FunPos,LinePos,NoPos), :: Priority, :: Rhs, :: ATypeVar,
:: RhsDefsOfType(ConsList,ExtensibleConses,SelectorList,TypeSpec,EmptyRhs),
:: RhsDefsOfType(ConsList,ExtensibleConses,SelectorList,TypeSpec,EmptyRhs,
AbstractTypeSpec),
:: SymbolTable, :: SymbolTableEntry, :: SymbolType, :: Type, :: BITVECT,
:: TypeContext, :: TypeDef{td_ident,td_pos,td_rhs}, :: TypeVar,
:: ParsedConstructor{pc_doc}, :: ParsedSelector{ps_doc}, :: DocType,
......@@ -336,6 +337,7 @@ where
parsef (SelectorList _ _ _ _) = parseRecordTypeDoc
parsef (TypeSpec _) = parseSynonymTypeDoc
parsef (EmptyRhs _) = parseAbstractTypeDoc
parsef (AbstractTypeSpec _ _) = parseAbstractTypeDoc
parsef _ = const $ Left $ IllegalState "Unknown RhsDefsOfType"
findRhsDoc :: ParsedTypeDef Documentation -> Maybe Documentation
......
......@@ -223,10 +223,11 @@ trim :== dropWhile isSpace
instance toString ParseWarning
where
toString (UnknownField f) = "Doc warning: unknown field '" +++ f +++ "'"
toString (IllegalField f) = "Doc warning: illegal field '" +++ f +++ "'"
toString NoDescription = "Doc warning: missing description"
toString UsedReturn = "Doc warning: @return is deprecated, use @result"
toString (UnknownField f) = "Doc warning: unknown field '" +++ f +++ "'"
toString (IllegalField f) = "Doc warning: illegal field '" +++ f +++ "'"
toString NoDescription = "Doc warning: missing description"
toString UsedReturn = "Doc warning: @return is deprecated, use @result"
toString (UnparsableType t) = "Doc warning: could not parse type '" +++ t +++ "'"
instance toString ParseError
where
......
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