| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Security.Advisories.Parse
Contents
Documentation
Arguments
| :: AttributeOverridePolicy | |
| -> OutOfBandAttributes | |
| -> Text | input (CommonMark with TOML header) |
| -> Either ParseAdvisoryError Advisory |
The main parsing function. OutOfBandAttributes are handled
according to the AttributeOverridePolicy.
data OutOfBandAttributes Source #
A source of attributes supplied out of band from the advisory
content. Values provided out of band are treated according to
the AttributeOverridePolicy.
The convenient way to construct a value of this type is to start
with emptyOutOfBandAttributes, then use the record accessors to
set particular fields.
Constructors
| OutOfBandAttributes | |
Fields | |
Instances
| Show OutOfBandAttributes Source # | |
Defined in Security.Advisories.Parse Methods showsPrec :: Int -> OutOfBandAttributes -> ShowS # show :: OutOfBandAttributes -> String # showList :: [OutOfBandAttributes] -> ShowS # | |
data AttributeOverridePolicy Source #
Constructors
| PreferInBand | |
| PreferOutOfBand | |
| NoOverrides | Parse error if attribute occurs both in-band and out-of-band |
Instances
| Show AttributeOverridePolicy Source # | |
Defined in Security.Advisories.Parse Methods showsPrec :: Int -> AttributeOverridePolicy -> ShowS # show :: AttributeOverridePolicy -> String # showList :: [AttributeOverridePolicy] -> ShowS # | |
| Eq AttributeOverridePolicy Source # | |
Defined in Security.Advisories.Parse Methods (==) :: AttributeOverridePolicy -> AttributeOverridePolicy -> Bool # (/=) :: AttributeOverridePolicy -> AttributeOverridePolicy -> Bool # | |
data ParseAdvisoryError Source #
Constructors
| MarkdownError ParseError Text | |
| MarkdownFormatError Text | |
| TomlError String Text | |
| AdvisoryError [MatchMessage Position] Text |