{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Data.Aeson.AutoType.CodeGen(
Lang(..)
, writeModule
, runModule
, defaultOutputFilename
) where
import Data.Text(Text)
import qualified Data.HashMap.Strict as Map
import Data.Aeson.AutoType.Type
import System.Exit
import Data.Aeson.AutoType.CodeGen.Haskell
import Data.Aeson.AutoType.CodeGen.Elm
data Lang = Haskell
| HaskellStrict
| Elm
defaultOutputFilename :: Lang -> FilePath
defaultOutputFilename :: Lang -> FilePath
defaultOutputFilename Haskell = FilePath
defaultHaskellFilename
defaultOutputFilename HaskellStrict = FilePath
defaultHaskellFilename
defaultOutputFilename Elm = FilePath
defaultElmFilename
writeModule :: Lang -> FilePath -> Text -> Map.HashMap Text Type -> IO ()
writeModule :: Lang -> FilePath -> Text -> HashMap Text Type -> IO ()
writeModule Haskell = FilePath -> Text -> HashMap Text Type -> IO ()
writeHaskellModule
writeModule HaskellStrict = FilePath -> Text -> HashMap Text Type -> IO ()
writeHaskellModule
writeModule Elm = FilePath -> Text -> HashMap Text Type -> IO ()
writeElmModule
runModule :: Lang -> FilePath -> [String] -> IO ExitCode
runModule :: Lang -> FilePath -> [FilePath] -> IO ExitCode
runModule Haskell = FilePath -> [FilePath] -> IO ExitCode
runHaskellModule
runModule HaskellStrict = FilePath -> [FilePath] -> IO ExitCode
runHaskellModuleStrict
runModule Elm = FilePath -> [FilePath] -> IO ExitCode
runElmModule