| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Main
Contents
- data HFlag_outputFilename = HFlagC_outputFilename
- flags_outputFilename :: String
- data HFlag_suggest = HFlagC_suggest
- flags_suggest :: Bool
- data HFlag_autounify = HFlagC_autounify
- flags_autounify :: Bool
- data HFlag_test = HFlagC_test
- flags_test :: Bool
- data HFlag_debug = HFlagC_debug
- flags_debug :: Bool
- data HFlag_typecheck = HFlagC_typecheck
- flags_typecheck :: Bool
- data HFlag_preprocessor = HFlagC_preprocessor
- flags_preprocessor :: Bool
- data HFlag_fakeFlag = HFlagC_fakeFlag
- flags_fakeFlag :: Bool
- myTrace :: String -> IO ()
- report :: Text -> IO ()
- fatal :: Text -> IO ()
- extractTypeFromJSONFile :: FilePath -> IO (Maybe (FilePath, Type, Value))
- preprocess :: ByteString -> ByteString
- dropPragma :: ByteString -> ByteString
- typeChecking :: Type -> [FilePath] -> [Value] -> IO [FilePath]
- generateHaskellFromJSONs :: [FilePath] -> FilePath -> IO ()
- main :: IO ()
Command line flags
flags_test :: Bool
flags_debug :: Bool
Works like Debug.trace when the --debug flag is enabled, and does nothing otherwise.
extractTypeFromJSONFile :: FilePath -> IO (Maybe (FilePath, Type, Value))
Extracts type from JSON file, along with the original Value.
In order to facilitate dealing with failures, it returns a triple of
FilePath, extracted Type, and a JSON Value.
preprocess :: ByteString -> ByteString
Perform preprocessing of JSON input to drop initial pragma.
dropPragma :: ByteString -> ByteString
Drop initial pragma.
typeChecking :: Type -> [FilePath] -> [Value] -> IO [FilePath]
Type checking all input files with given type, and return a list of filenames for files that passed the check.
generateHaskellFromJSONs :: [FilePath] -> FilePath -> IO ()
Take a set of JSON input filenames, Haskell output filename, and generate module parsing these JSON files.