Copyright | (C) Richard Cook 2018 |
---|---|
License | MIT |
Maintainer | rcook@rcook.org |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This modules provides Template Haskell helper functions for eliminating boilerplate
Documentation
:: Name | Name of the amazonka |
-> String | Name of the service type to generate |
-> String | Name of the session type to generate |
-> Q [Dec] | Declarations for splicing into source file |
Generates type-safe AWS service and session wrappers types for use with
connect
and withAWS
functions
Example top-level invocation:
wrapAWSService 'dynamoDB "DDBService" "DDBSession"
This will generate boilerplate like the following:
data DDBService = DDBService Service data DDBSession = DDBSession Session instance ServiceClass DDBService where type TypedSession DDBService = DDBSession rawService (DDBService x) = x wrappedSession = DDBSession instance SessionClass DDBSession where rawSession (DDBSession x) = x dynamoDBService :: DDBService dynamoDBService = DDBService dynamoDB