hal 0.1.0 → 0.1.1
raw patch · 3 files changed
+54/−49 lines, 3 filesdep ~aesondep ~bytestringdep ~containersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, bytestring, containers, envy, exceptions, http-conduit, http-types, mtl, text, time
API changes (from Hackage documentation)
Files
- README.md +2/−2
- hal.cabal +51/−46
- src/AWS/Lambda/RuntimeClient.hs +1/−1
README.md view
@@ -65,7 +65,7 @@ module Main where -import AWS.Lambda.Runtime (simpleLambdaRuntime)+import AWS.Lambda.Runtime (pureRuntime) import Data.Aeson (FromJSON, ToJSON) import GHC.Generics (Generic) @@ -85,7 +85,7 @@ idHandler Request { input } = Response { output = input } main :: IO ()-main = simpleLambdaRuntime idHandler+main = pureRuntime idHandler ``` Don't forget to define your [CloudFormation] stack:
hal.cabal view
@@ -1,52 +1,57 @@--- This file has been generated from package.yaml by hpack version 0.28.2.------ see: https://github.com/sol/hpack------ hash: 9e95d1b7a42420d7a38abcd2683add3ad06324396c38400f285f6ef0dea5ec98--name: hal-version: 0.1.0-synopsis: Please see the README.md file for this project.-description: A runtime environment for Haskell applications running on AWS Lambda.-category: Web,AWS-homepage: https://github.com/Nike-inc/hal#readme-bug-reports: https://github.com/Nike-inc/hal/issues-author: Nike, Inc.-maintainer: nikeoss-copyright: 2018 Nike, Inc.-license: BSD3-license-file: LICENSE-build-type: Simple-cabal-version: >= 1.10+cabal-version: >=1.10+name: hal+version: 0.1.1+license: BSD3+license-file: LICENSE+copyright: 2018 Nike, Inc.+maintainer: nikeoss+author: Nike, Inc.+homepage: https://github.com/Nike-inc/hal#readme+bug-reports: https://github.com/Nike-inc/hal/issues+synopsis: A runtime environment for Haskell applications running on AWS Lambda.+description:+ This library uniquely supports different types of AWS Lambda Handlers for your+ needs/comfort with advanced Haskell. Instead of exposing a single function+ that constructs a Lambda, this library exposes many.+category: Web,AWS+build-type: Simple extra-source-files: README.md source-repository head- type: git- location: https://github.com/Nike-inc/hal+ type: git+ location: https://github.com/Nike-inc/hal library- exposed-modules:- AWS.Lambda.Context- AWS.Lambda.Internal- AWS.Lambda.Runtime- AWS.Lambda.RuntimeClient- other-modules:- Paths_hal- hs-source-dirs:- src- default-extensions: OverloadedStrings BangPatterns DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies EmptyCase GeneralizedNewtypeDeriving InstanceSigs LambdaCase MultiParamTypeClasses MultiWayIf OverloadedStrings PatternSynonyms ScopedTypeVariables- ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-partial-type-signatures -fno-warn-name-shadowing -fwarn-tabs -fwarn-unused-imports -fwarn-missing-signatures -fwarn-incomplete-patterns- build-depends:- aeson <2.0.0- , base >=4.7 && <5- , bytestring <1.0.0- , containers <1.0.0- , envy <2.0.0- , exceptions <1.0.0- , http-conduit <3.0.0- , http-types <1.0.0- , mtl <3.0.0- , text <2.0.0- , time <2.0.0- default-language: Haskell2010+ exposed-modules:+ AWS.Lambda.Context+ AWS.Lambda.Internal+ AWS.Lambda.Runtime+ AWS.Lambda.RuntimeClient+ hs-source-dirs: src+ other-modules:+ Paths_hal+ default-language: Haskell2010+ default-extensions: OverloadedStrings BangPatterns+ DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric+ DeriveLift DeriveTraversable DerivingStrategies EmptyCase+ GeneralizedNewtypeDeriving InstanceSigs LambdaCase+ MultiParamTypeClasses MultiWayIf OverloadedStrings PatternSynonyms+ ScopedTypeVariables+ ghc-options: -Wall -Wcompat -Wincomplete-record-updates+ -Wincomplete-uni-patterns -Wredundant-constraints+ -fno-warn-partial-type-signatures -fno-warn-name-shadowing+ -fwarn-tabs -fwarn-unused-imports -fwarn-missing-signatures+ -fwarn-incomplete-patterns+ build-depends:+ aeson >=1.3.1.1 && <1.4,+ base >=4.7 && <5,+ bytestring >=0.10.8.2 && <0.11,+ containers >=0.5.11.0 && <0.6,+ envy >=1.5.1.0 && <1.6,+ exceptions >=0.10.0 && <0.11,+ http-conduit >=2.3.2 && <2.4,+ http-types >=0.12.2 && <0.13,+ mtl >=2.2.2 && <2.3,+ text >=1.2.3.1 && <1.3,+ time >=1.8.0.2 && <1.9
src/AWS/Lambda/RuntimeClient.hs view
@@ -59,7 +59,7 @@ getNextEvent baseRuntimeRequest = do resOrEx <- runtimeClientRetryTry $ httpJSONEither $ toNextEventRequest baseRuntimeRequest let checkStatus res = if not $ statusIsSuccessful $ getResponseStatus res then- Left "Unexpected Runtime Error: Could retrieve next event."+ Left "Unexpected Runtime Error: Could not retrieve next event." else Right res let resOrMsg = first (displayException :: HttpException -> String) resOrEx >>= checkStatus