Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Security.Advisories.Core.HsecId
Synopsis
- data HsecId
- hsecIdYear :: HsecId -> Integer
- hsecIdSerial :: HsecId -> Integer
- mkHsecId :: Integer -> Integer -> Maybe HsecId
- placeholder :: HsecId
- isPlaceholder :: HsecId -> Bool
- parseHsecId :: String -> Maybe HsecId
- printHsecId :: HsecId -> String
- nextHsecId :: Integer -> HsecId -> HsecId
- getNextHsecId :: HsecId -> IO HsecId
Documentation
hsecIdYear :: HsecId -> Integer Source #
hsecIdSerial :: HsecId -> Integer Source #
Make an HsecId
. Year and serial must both be positive, or
else both must be zero (the placeholder
).
placeholder :: HsecId Source #
The placeholder ID: HSEC-0000-0000.
See also isPlaceholder
.
isPlaceholder :: HsecId -> Bool Source #
Test whether an ID is the placeholder
parseHsecId :: String -> Maybe HsecId Source #
Parse an HsecId
. The placeholder
is accepted.
printHsecId :: HsecId -> String Source #
Given a year and an HSEC ID, return a larger HSEC ID. This function, when given the current year and the greatest allocated HSEC ID, returns the next HSEC ID to allocate.