aeson-schema- Haskell JSON schema validator and parser generator

Safe HaskellNone




vectorUnique :: Eq a => Vector a -> Bool Source

 Tests whether all items in a vector are different from each other.

formatValidators :: [(Text, Maybe (Text -> Maybe String))] Source

 List of format validators. Some validators haven't been implemented yet. Those which are implemented take a Text value and return an error in case the input is invalid.

validateFormat Source


:: Text


-> Text


-> Maybe String

message in case of an error

Validates a Text value against a format.

isDivisibleBy :: Scientific -> Scientific -> Bool Source

 Tests whether the first number is divisible by the second with no remainder.

replaceHiddenModules Source


:: Data a 
=> a

Dec or Exp

-> a 

Workaround for an issue in Template Haskell: when you quote a name in TH like 'Text (Data.Text.Text) then TH searches for the module where Text is defined, even if that module is not exported by its package (in this case Text is defined in Data.Text.Internal). This works when we use TH to insert some code in a module but not when we use the TH code for pretty-printing.

cleanPatterns :: Data a => a -> a Source

 Workaround for a bug in Template Haskell: TH parses the empty list constructor in patterns as ConP (mkName "Prelude.[]") [] instead of ListP []

getUsedModules :: Data a => a -> [String] Source

 Extracts a list of used modules from a TH code tree.