jsons-to-schema-0.1.0.0: JSON to JSON Schema

JSONSchema.Draft4.Internal.Utils

Description

Assorted internal utilities.

Synopsis

# Documentation

alt :: Alternative f => (a -> a -> a) -> f a -> f a -> f a Source #

Functions like an Applicative but keeps the Just value if it exists.

Returns the and of the Just values or Nothing if there are no Justs

The unification function for the integer constraints maximum and exclusiveMaximum. When unifying schemas the exclusiveMaximum may somestimes need to be modified based on the @maximum.

The unification function for the integer constraints minimum and exclusiveMinimum. When unifying schemas the exclusiveMinimum may somestimes need to be modified based on the @minimum.

zipWithPadding :: a -> b -> [a] -> [b] -> [(a, b)] Source #

Zips a list but uses the default value if one list is longer than the other.

listToMaybeList :: [a] -> Maybe [a] Source #

Similar to listFromMaybe, but returns the entire list as a Just if it is not empty instead of only the first item.

setToMaybeSet :: Set a -> Maybe (Set a) Source #

Returns the entire set as a Just if it is not empty instead of only one item.

Parses a bytestring to a value.

Converts a schema to text.