fakedata-0.2.2: Library for producing fake data

Safe HaskellNone
LanguageHaskell2010

Faker.Provider.TH

Synopsis

Documentation

"beer" "name") The above code will produce a function named parseBeerName parseBeerName :: (FromJSON a, Monoid a) => FakerSettings -> Value -> Parser a Note that a function named parseBeerField should be present in the scope for this to work.

genParser Source #

Arguments

:: Text

Entity name. Example: animal, beer etc. This should be always lowercase.

-> Text

Field name within the entity.

-> Q [Dec] 

genParsers Source #

Arguments

:: Text

Entity name. Example: animal, beer etc. This should be always lowercase.

-> [Text]

Field name within the entity.

-> Q [Dec] 

genProviders Source #

Arguments

:: Text

Entity name. Example: animal, beer etc. This should be always lowercase.

-> [Text]

Field name within the entity.

-> Q [Dec] 

"beer" "name") This will produce a function named: "beerNameProvider" Assumes the presence of parseBeerName function in the scope.

genProvider Source #

Arguments

:: Text

Entity name. Example: animal, beer etc. This should be always lowercase.

-> Text

Field name within the entity.

-> Q [Dec] 

"app" "version") This will generate a function named parseAppVersionUnresolved :: (FromJSON a, Monoid a) => FakerSettings -> Value -> Parser (Unresolved a) This function assumes that parseUnresolvedAppField function is available in the scope.

genProviderUnresolveds Source #

Arguments

:: Text

Entity name. Example: animal, beer etc. This should be always lowercase.

-> [Text]

Field name within the entity.

-> Q [Dec] 

"beer" "name") This will produce a function named: "beerNameProvider" Assumes the presence of parseBeerNameUnresolved function in the scope.

genProviderUnresolved Source #

Arguments

:: Text

Entity name. Example: animal, beer etc. This should be always lowercase.

-> Text

Field name within the entity.

-> Q [Dec]