schematic-0.5.0.0: JSON-biased spec and validation tool

Safe HaskellNone
LanguageHaskell2010

Data.Schematic.Validation

Documentation

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

toUnion :: USubset s' (s ': ss) (RImage s' (s ': ss)) => Sing (s ': ss) -> Union JsonRepr s' -> JsonRepr (SchemaUnion (s ': ss)) Source #

umatch' :: UElem a as i => Sing a -> Union f as -> Maybe (f a) 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 #