Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type APIWithChangelog = (API, APIChangelog)
- data APIChangelog
- data APIChange
- = ChAddType TypeName NormTypeDecl
- | ChDeleteType TypeName
- | ChRenameType TypeName TypeName
- | ChAddField TypeName FieldName APIType (Maybe DefaultValue)
- | ChDeleteField TypeName FieldName
- | ChRenameField TypeName FieldName FieldName
- | ChChangeField TypeName FieldName APIType MigrationTag
- | ChAddUnionAlt TypeName FieldName APIType
- | ChDeleteUnionAlt TypeName FieldName
- | ChRenameUnionAlt TypeName FieldName FieldName
- | ChAddEnumVal TypeName FieldName
- | ChDeleteEnumVal TypeName FieldName
- | ChRenameEnumVal TypeName FieldName FieldName
- | ChCustomType TypeName MigrationTag
- | ChCustomAll MigrationTag
- type MigrationTag = String
- data VersionExtra
- showVersionExtra :: VersionExtra -> String
- data UpdateTypePos
- data UpdateDeclPos
- data APITableChange
Changelog representation
type APIWithChangelog = (API, APIChangelog) Source #
data APIChangelog Source #
An API changelog, consisting of a list of versions with the
changes from one version to the next. The versions must be in
descending order (according to the Ord
Version
instance).
ChangesUpTo VersionExtra [APIChange] APIChangelog | The changes from the previous version up to this version. |
ChangesStart Version | The initial version |
Instances
Eq APIChangelog Source # | |
Defined in Data.API.Changes.Types (==) :: APIChangelog -> APIChangelog -> Bool # (/=) :: APIChangelog -> APIChangelog -> Bool # | |
Show APIChangelog Source # | |
Defined in Data.API.Changes.Types showsPrec :: Int -> APIChangelog -> ShowS # show :: APIChangelog -> String # showList :: [APIChangelog] -> ShowS # |
A single change within a changelog
type MigrationTag = String Source #
Within the changelog, custom migrations are represented as strings, so we have less type-safety.
data VersionExtra Source #
Represents either a released version (with a version number) or the version under development, which is newer than any release
Instances
Eq VersionExtra Source # | |
Defined in Data.API.Changes.Types (==) :: VersionExtra -> VersionExtra -> Bool # (/=) :: VersionExtra -> VersionExtra -> Bool # | |
Ord VersionExtra Source # | |
Defined in Data.API.Changes.Types compare :: VersionExtra -> VersionExtra -> Ordering # (<) :: VersionExtra -> VersionExtra -> Bool # (<=) :: VersionExtra -> VersionExtra -> Bool # (>) :: VersionExtra -> VersionExtra -> Bool # (>=) :: VersionExtra -> VersionExtra -> Bool # max :: VersionExtra -> VersionExtra -> VersionExtra # min :: VersionExtra -> VersionExtra -> VersionExtra # | |
Show VersionExtra Source # | |
Defined in Data.API.Changes.Types showsPrec :: Int -> VersionExtra -> ShowS # show :: VersionExtra -> String # showList :: [VersionExtra] -> ShowS # | |
PP VersionExtra Source # | |
Defined in Data.API.Changes.Types pp :: VersionExtra -> String Source # |
data UpdateTypePos Source #
Represents the positions in a type to apply an update
Instances
Eq UpdateTypePos Source # | |
Defined in Data.API.Changes.Types (==) :: UpdateTypePos -> UpdateTypePos -> Bool # (/=) :: UpdateTypePos -> UpdateTypePos -> Bool # | |
Show UpdateTypePos Source # | |
Defined in Data.API.Changes.Types showsPrec :: Int -> UpdateTypePos -> ShowS # show :: UpdateTypePos -> String # showList :: [UpdateTypePos] -> ShowS # |
data UpdateDeclPos Source #
Represents the positions in a declaration to apply an update
UpdateHere (Maybe UpdateDeclPos) | |
UpdateRecord (Map FieldName (Maybe UpdateTypePos)) | |
UpdateUnion (Map FieldName (Maybe UpdateTypePos)) | |
UpdateType UpdateTypePos |
Instances
Eq UpdateDeclPos Source # | |
Defined in Data.API.Changes.Types (==) :: UpdateDeclPos -> UpdateDeclPos -> Bool # (/=) :: UpdateDeclPos -> UpdateDeclPos -> Bool # | |
Show UpdateDeclPos Source # | |
Defined in Data.API.Changes.Types showsPrec :: Int -> UpdateDeclPos -> ShowS # show :: UpdateDeclPos -> String # showList :: [UpdateDeclPos] -> ShowS # |
data APITableChange Source #
APIChange NormAPI APIChange (Map TypeName UpdateDeclPos) | An initial API, an APIChange and the positions in which to apply it |
ValidateData NormAPI | Request to validate the dataset against the given API |
Instances
Eq APITableChange Source # | |
Defined in Data.API.Changes.Types (==) :: APITableChange -> APITableChange -> Bool # (/=) :: APITableChange -> APITableChange -> Bool # | |
Show APITableChange Source # | |
Defined in Data.API.Changes.Types showsPrec :: Int -> APITableChange -> ShowS # show :: APITableChange -> String # showList :: [APITableChange] -> ShowS # | |
PPLines APITableChange Source # | |
Defined in Data.API.Changes.Types ppLines :: APITableChange -> [String] Source # |