module Data.API.Tools
( generate
, generateAPITools
, generateWith
, generateAPIToolsWith
, ToolSettings
, defaultToolSettings
, warnOnOmittedInstance
, newtypeSmartConstructors
, enumTool
, exampleTool
, deepSeqTool
, jsonTool
, jsonTool'
, cborTool
, jsonTestsTool
, cborTestsTool
, cborToJSONTestsTool
, jsonToCBORTestsTool
, jsonGenericValueTestsTool
, cborGenericValueTestsTool
, lensTool
, quickCheckTool
, safeCopyTool
, samplesTool
) where
import Data.API.Tools.Combinators
import Data.API.Tools.Datatypes
import Data.API.Tools.DeepSeq
import Data.API.Tools.Enum
import Data.API.Tools.Example
import Data.API.Tools.CBOR
import Data.API.Tools.JSON
import Data.API.Tools.JSONTests
import Data.API.Tools.Lens
import Data.API.Tools.QuickCheck
import Data.API.Tools.SafeCopy
import Data.API.Types
import qualified Data.Monoid as Monoid
import Language.Haskell.TH
generate :: API -> Q [Dec]
generate :: API -> Q [Dec]
generate = ToolSettings -> API -> Q [Dec]
generateWith ToolSettings
defaultToolSettings
generateWith :: ToolSettings -> API -> Q [Dec]
generateWith :: ToolSettings -> API -> Q [Dec]
generateWith ToolSettings
ts API
api = ToolSettings -> API -> [APITool] -> Q [Dec]
generateAPIToolsWith ToolSettings
ts API
api [APITool
datatypesTool]
generateAPITools :: API -> [APITool] -> Q [Dec]
generateAPITools :: API -> [APITool] -> Q [Dec]
generateAPITools = ToolSettings -> API -> [APITool] -> Q [Dec]
generateAPIToolsWith ToolSettings
defaultToolSettings
generateAPIToolsWith :: ToolSettings -> API -> [APITool] -> Q [Dec]
generateAPIToolsWith :: ToolSettings -> API -> [APITool] -> Q [Dec]
generateAPIToolsWith ToolSettings
ts API
api [APITool]
tools = APITool -> ToolSettings -> API -> Q [Dec]
forall a. Tool a -> ToolSettings -> a -> Q [Dec]
runTool ([APITool] -> APITool
forall a. Monoid a => [a] -> a
Monoid.mconcat [APITool]
tools) ToolSettings
ts API
api