Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
module Data.Schematic.Schema
module Data.Schematic.Migration
module Data.Schematic.Utils
decodeAndValidateJson :: forall schema. (FromJSON (JsonRepr schema), TopLevel schema, SingI schema) => ByteString -> ParseResult (JsonRepr schema) Source #
parseAndValidateJson :: forall schema. (FromJSON (JsonRepr schema), TopLevel schema, SingI schema) => Value -> ParseResult (JsonRepr schema) Source #
parseAndValidateJsonBy :: (FromJSON (JsonRepr schema), TopLevel schema, SingI schema) => proxy schema -> Value -> ParseResult (JsonRepr schema) Source #
parseAndValidateVersionedJson :: forall proxy v. (SingI (AllVersions v), Migratable (AllVersions v)) => proxy v -> Value -> ParseResult (JsonRepr (Snd (Head (AllVersions v)))) Source #
parseAndValidateTopVersionJson :: forall proxy v. SingI (TopVersion (AllVersions v)) => proxy v -> Value -> ParseResult (JsonRepr (TopVersion (AllVersions v))) Source #
decodeAndValidateVersionedJson :: (Migratable (AllVersions versioned), SingI (AllVersions versioned)) => proxy versioned -> ByteString -> ParseResult (JsonRepr (Snd (Head (AllVersions versioned)))) Source #
parseAndValidateWithMList :: MList revisions -> Value -> ParseResult (JsonRepr (Head revisions)) Source #
decodeAndValidateVersionedWithMList :: proxy versioned -> MList (MapSnd (AllVersions versioned)) -> ByteString -> ParseResult (JsonRepr (Head (MapSnd (AllVersions versioned)))) Source #
isValid :: ParseResult a -> Bool Source #
isDecodingError :: ParseResult a -> Bool Source #
isValidationError :: ParseResult a -> Bool Source #
data ParseResult a Source #
Functor ParseResult Source # | |
Eq a => Eq (ParseResult a) Source # | |
Show a => Show (ParseResult a) Source # | |
class Migratable revisions Source #
mparse
(Migratable (Tail (Revision, Schema) revisions), MigrateSchema (Snd Revision Schema (Head (Revision, Schema) (Tail (Revision, Schema) revisions))) (Snd Revision Schema (Head (Revision, Schema) revisions)), SingI Schema (Snd Revision Schema (Head (Revision, Schema) revisions))) => Migratable revisions Source # | |
(TopLevel (Snd Revision Schema rev), SingI Schema (Snd Revision Schema rev)) => Migratable ((:) (Revision, Schema) rev ([] (Revision, Schema))) Source # | |