| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Acolyte.Codegen.Emit
Description
Haskell code generation from the API IR.
Produces a complete Haskell module with: * Path types using GHC.TypeLits * Requestresponse data types with FromJSONToJSON * The API type as a promoted list * Requires Auth on secured endpoints
Synopsis
- emitModule :: EmitConfig -> ApiIR -> Text
- data EmitConfig = EmitConfig {
- emitModuleName :: !Text
- emitHandlerStubs :: !Bool
- defaultEmitConfig :: EmitConfig
Documentation
emitModule :: EmitConfig -> ApiIR -> Text Source #
Generate a complete Haskell module from an API IR.
data EmitConfig Source #
Configuration for code emission.
Constructors
| EmitConfig | |
Fields
| |
Instances
| Show EmitConfig Source # | |
Defined in Acolyte.Codegen.Emit Methods showsPrec :: Int -> EmitConfig -> ShowS # show :: EmitConfig -> String # showList :: [EmitConfig] -> ShowS # | |
defaultEmitConfig :: EmitConfig Source #
Default emit configuration: module name Generated.API with handler stubs enabled.