schematic-0.5.0.0: JSON-biased spec and validation tool

Safe HaskellNone
LanguageHaskell2010

Data.Schematic

Documentation

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 #

parseAndValidateWithMList :: Monad m => MList m revisions -> Value -> m (ParseResult (JsonRepr (Head revisions))) Source #

decodeAndValidateVersionedWithMList :: Monad m => proxy versioned -> MList m (MapSnd (AllVersions versioned)) -> ByteString -> m (ParseResult (JsonRepr (Head (MapSnd (AllVersions versioned))))) Source #

data ParseResult a Source #

Instances
Functor ParseResult Source # 
Instance details

Defined in Data.Schematic.Validation

Methods

fmap :: (a -> b) -> ParseResult a -> ParseResult b #

(<$) :: a -> ParseResult b -> ParseResult a #

Foldable ParseResult Source # 
Instance details

Defined in Data.Schematic.Validation

Methods

fold :: Monoid m => ParseResult m -> m #

foldMap :: Monoid m => (a -> m) -> ParseResult a -> m #

foldr :: (a -> b -> b) -> b -> ParseResult a -> b #

foldr' :: (a -> b -> b) -> b -> ParseResult a -> b #

foldl :: (b -> a -> b) -> b -> ParseResult a -> b #

foldl' :: (b -> a -> b) -> b -> ParseResult a -> b #

foldr1 :: (a -> a -> a) -> ParseResult a -> a #

foldl1 :: (a -> a -> a) -> ParseResult a -> a #

toList :: ParseResult a -> [a] #

null :: ParseResult a -> Bool #

length :: ParseResult a -> Int #

elem :: Eq a => a -> ParseResult a -> Bool #

maximum :: Ord a => ParseResult a -> a #

minimum :: Ord a => ParseResult a -> a #

sum :: Num a => ParseResult a -> a #

product :: Num a => ParseResult a -> a #

Traversable ParseResult Source # 
Instance details

Defined in Data.Schematic.Validation

Methods

traverse :: Applicative f => (a -> f b) -> ParseResult a -> f (ParseResult b) #

sequenceA :: Applicative f => ParseResult (f a) -> f (ParseResult a) #

mapM :: Monad m => (a -> m b) -> ParseResult a -> m (ParseResult b) #

sequence :: Monad m => ParseResult (m a) -> m (ParseResult a) #

Eq a => Eq (ParseResult a) Source # 
Instance details

Defined in Data.Schematic.Validation

Show a => Show (ParseResult a) Source # 
Instance details

Defined in Data.Schematic.Validation

(TopLevel a, SingI a, FromJSON (JsonRepr a)) => FromJSON (ParseResult (JsonRepr a)) Source # 
Instance details

Defined in Data.Schematic.Validation

field :: forall fn. KnownSymbol fn => FieldConstructor fn Source #