json-to-type-4.0.0: Automatic type declaration for JSON input data
Safe HaskellSafe-Inferred
LanguageHaskell2010

JsonToType.CodeGen

Description

Code generation and test running in different languages. (Switchbox.)

Synopsis

Documentation

data Lang Source #

Available output languages.

Constructors

Haskell 
HaskellStrict 
Elm 

writeModule :: Lang -> FilePath -> Text -> HashMap Text Type -> IO () Source #

Write a Haskell module to an output file, or stdout if - filename is given.

runModule :: Lang -> FilePath -> [String] -> IO ExitCode Source #

Run module in a given language.

defaultOutputFilename :: Lang -> FilePath Source #

Default output filname is used, when there is no explicit output file path, or it is "-" (stdout). Default module name is consistent with it.