Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data IndividualInfo = IndividualInfo {}
- type IndividualInfoCollection = ([IndividualInfo], [Bool])
- renderNameWithVersion :: HasNameAndVersion a => a -> String
- class Eq a => HasNameAndVersion a where
- getPacName :: a -> String
- getPacVersion :: a -> Maybe Version
- data PoseidonEntity
- data SignedEntity
- hasVersion :: HasNameAndVersion a => a -> Bool
- type EntitiesList = [PoseidonEntity]
- type SignedEntitiesList = [SignedEntity]
- data PacNameAndVersion = PacNameAndVersion {}
- makePacNameAndVersion :: HasNameAndVersion a => a -> PacNameAndVersion
- isLatestInCollection :: (MonadThrow m, HasNameAndVersion a) => [a] -> a -> m Bool
- class EntitySpec a
- resolveUniqueEntityIndices :: EntitySpec a => Bool -> [a] -> IndividualInfoCollection -> PoseidonIO [Int]
- indInfoConformsToEntitySpecs :: EntitySpec a => IndividualInfo -> Bool -> [a] -> Bool
- underlyingEntity :: EntitySpec a => a -> PoseidonEntity
- entitySpecParser :: EntitySpec a => Parser a
- readEntitiesFromFile :: EntitySpec a => FilePath -> IO [a]
- readEntitiesFromString :: EntitySpec a => String -> Either PoseidonException [a]
- determineNonExistentEntities :: EntitySpec a => [a] -> IndividualInfoCollection -> EntitiesList
- determineRelevantPackages :: (MonadThrow m, EntitySpec a) => [a] -> IndividualInfoCollection -> m [PacNameAndVersion]
- entitiesListP :: EntitySpec a => Parser [a]
- data EntityInput a
- readEntityInputs :: (MonadIO m, EntitySpec a, Eq a) => [EntityInput a] -> m [a]
- checkIfAllEntitiesExist :: EntitySpec a => [a] -> IndividualInfoCollection -> PoseidonIO ()
- resolveEntityIndices :: EntitySpec a => Bool -> [a] -> IndividualInfoCollection -> [Int]
- reportDuplicateIndividuals :: [IndividualInfo] -> [(IndividualInfo, [PoseidonEntity])]
Documentation
data IndividualInfo Source #
a minimal datatype representing an individual in a collection of packages
IndividualInfo | |
|
Instances
type IndividualInfoCollection = ([IndividualInfo], [Bool]) Source #
a tuple of a collection of IndividualInfos and a list of bools indicating whether the given sample is in the latest version of packages
renderNameWithVersion :: HasNameAndVersion a => a -> String Source #
universal rendering of package names and version
class Eq a => HasNameAndVersion a where Source #
A class to represent a package-identifying property
:: a | |
-> String | a name property |
Instances
HasNameAndVersion PackageIteration Source # | |
Defined in Poseidon.Chronicle | |
HasNameAndVersion IndividualInfo Source # | |
Defined in Poseidon.EntityTypes getPacName :: IndividualInfo -> String Source # | |
HasNameAndVersion PacNameAndVersion Source # | |
Defined in Poseidon.EntityTypes | |
HasNameAndVersion PoseidonPackage Source # | |
Defined in Poseidon.Package | |
HasNameAndVersion PoseidonYamlStruct Source # | |
Defined in Poseidon.Package | |
HasNameAndVersion ExtendedIndividualInfo Source # | |
Defined in Poseidon.ServerClient | |
HasNameAndVersion GroupInfo Source # | |
Defined in Poseidon.ServerClient | |
HasNameAndVersion PackageInfo Source # | |
Defined in Poseidon.ServerClient getPacName :: PackageInfo -> String Source # getPacVersion :: PackageInfo -> Maybe Version Source # |
data PoseidonEntity Source #
A datatype to represent a requested package, group or individual
Pac PacNameAndVersion | all individuals in a package. A version can be specified, if not implicitly request the latest |
Group String | all individuals with a given group, in all of the latest packages |
Ind String | all individuals with the given name, in all of the latest packages |
SpecificInd String String PacNameAndVersion | the individual specified by its name, group and package. If not versioned, then take the latest version. |
Instances
data SignedEntity Source #
a signed entity specification, denoting inclusion or exclusion of an entity
Instances
hasVersion :: HasNameAndVersion a => a -> Bool Source #
a convenience function
type EntitiesList = [PoseidonEntity] Source #
type SignedEntitiesList = [SignedEntity] Source #
data PacNameAndVersion Source #
The minimal instance of HasNameAndVersion
Instances
Show PacNameAndVersion Source # | |
Defined in Poseidon.EntityTypes showsPrec :: Int -> PacNameAndVersion -> ShowS # show :: PacNameAndVersion -> String # showList :: [PacNameAndVersion] -> ShowS # | |
Eq PacNameAndVersion Source # | |
Defined in Poseidon.EntityTypes (==) :: PacNameAndVersion -> PacNameAndVersion -> Bool # (/=) :: PacNameAndVersion -> PacNameAndVersion -> Bool # | |
Ord PacNameAndVersion Source # | |
Defined in Poseidon.EntityTypes compare :: PacNameAndVersion -> PacNameAndVersion -> Ordering # (<) :: PacNameAndVersion -> PacNameAndVersion -> Bool # (<=) :: PacNameAndVersion -> PacNameAndVersion -> Bool # (>) :: PacNameAndVersion -> PacNameAndVersion -> Bool # (>=) :: PacNameAndVersion -> PacNameAndVersion -> Bool # max :: PacNameAndVersion -> PacNameAndVersion -> PacNameAndVersion # min :: PacNameAndVersion -> PacNameAndVersion -> PacNameAndVersion # | |
HasNameAndVersion PacNameAndVersion Source # | |
Defined in Poseidon.EntityTypes |
makePacNameAndVersion :: HasNameAndVersion a => a -> PacNameAndVersion Source #
a function to normalise any instance of HasNameAndVersion to the minimal concrete type PacNameAndVersion
isLatestInCollection :: (MonadThrow m, HasNameAndVersion a) => [a] -> a -> m Bool Source #
a function to check whether a given package is the latest within a collection
class EntitySpec a Source #
A class to generalise signed and unsigned Entity Lists. Both have the feature that they can be used to filter individuals.
indInfoConformsToEntitySpec, underlyingEntity, entitySpecParser
Instances
EntitySpec PoseidonEntity Source # | |
Defined in Poseidon.EntityTypes | |
EntitySpec SignedEntity Source # | |
Defined in Poseidon.EntityTypes |
resolveUniqueEntityIndices :: EntitySpec a => Bool -> [a] -> IndividualInfoCollection -> PoseidonIO [Int] Source #
indInfoConformsToEntitySpecs :: EntitySpec a => IndividualInfo -> Bool -> [a] -> Bool Source #
this function checks whether a given individual info is selected by a given list of entities.
:: EntitySpec a | |
=> a | |
-> PoseidonEntity | returns the unterlying entity |
:: EntitySpec a | |
=> Parser a | a parser |
readEntitiesFromFile :: EntitySpec a => FilePath -> IO [a] Source #
readEntitiesFromString :: EntitySpec a => String -> Either PoseidonException [a] Source #
determineNonExistentEntities :: EntitySpec a => [a] -> IndividualInfoCollection -> EntitiesList Source #
this returns a list of entities which could not be found
determineRelevantPackages :: (MonadThrow m, EntitySpec a) => [a] -> IndividualInfoCollection -> m [PacNameAndVersion] Source #
determine all packages with versions that contain individuals covered by the given entities
entitiesListP :: EntitySpec a => Parser [a] Source #
data EntityInput a Source #
readEntityInputs :: (MonadIO m, EntitySpec a, Eq a) => [EntityInput a] -> m [a] Source #
checkIfAllEntitiesExist :: EntitySpec a => [a] -> IndividualInfoCollection -> PoseidonIO () Source #
resolveEntityIndices :: EntitySpec a => Bool -> [a] -> IndividualInfoCollection -> [Int] Source #
reportDuplicateIndividuals :: [IndividualInfo] -> [(IndividualInfo, [PoseidonEntity])] Source #
takes a list of selected individuals, checks for duplicates and reports a list of individuals with suggested Entity specifications