generated from freckle/haskell-library-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathamazonka-mtl.cabal
219 lines (213 loc) · 6.57 KB
/
amazonka-mtl.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
cabal-version: 1.18
-- This file has been generated from package.yaml by hpack version 0.37.0.
--
-- see: https://github.com/sol/hpack
name: amazonka-mtl
version: 0.1.1.0
synopsis: MTL-style type-class and deriving-via newtypes for Amazonka
description: This package allows incorporation of AWS actions into any MTL-style function,
.
> import Amazonka.Data.Text (ToText(..))
> import Amazonka.S3.ListObjects
> import Amazonka.S3.Types.Object
> import Blammo.Logging
> import Conduit
> import Control.Lens hiding ((.=))
> import Control.Monad.AWS as AWS
>
> someAction
> :: ( MonadIO m
> , MonadLogger m
> , MonadAWS m
> , MonadReader env m
> , HasSettings env
> )
> => m ()
> someAction = do
> Settings {..} <- view settingsL
>
> keys <-
> runConduit
> $ paginate (newListObjects settingsBucketName)
> .| concatMapC (^. listObjectsResponse_contents)
> .| concatC
> .| mapC (^. object_key . to toText)
> .| iterMC (\k -> logDebug $ k :# [])
> .| sinkList
>
> logInfo $ "Bucket contents" :# ["keys" .= keys]
.
This package also provides a number of options for execution:
.
* Through a concrete transformer: "Control.Monad.AWS.EnvT"
* Through your own reader env and deriving-via: "Control.Monad.AWS.ViaReader"
.
This package also provides mechanisms for mocking AWS in tests:
.
* Through a concrete transformer: "Control.Monad.AWS.MockT"
* Through your own reader env and deriving-via: "Control.Monad.AWS.ViaMock"
.
Please see individual module documentation for all the details.
category: Utils
homepage: https://github.com/freckle/amazonka-mtl#readme
bug-reports: https://github.com/freckle/amazonka-mtl/issues
maintainer: Freckle Education
license: MIT
license-file: LICENSE
build-type: Simple
extra-source-files:
package.yaml
extra-doc-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/freckle/amazonka-mtl
library
exposed-modules:
Control.Monad.AWS
Control.Monad.AWS.Class
Control.Monad.AWS.EnvT
Control.Monad.AWS.Matchers
Control.Monad.AWS.MockT
Control.Monad.AWS.ViaMock
Control.Monad.AWS.ViaReader
other-modules:
Paths_amazonka_mtl
hs-source-dirs:
library
default-extensions:
BangPatterns
DataKinds
DeriveAnyClass
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
NoImplicitPrelude
NoMonomorphismRestriction
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TypeApplications
TypeFamilies
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missed-specialisations -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-safe -Wno-unsafe
build-depends:
amazonka
, amazonka-core
, base <5
, conduit
, lens
, monad-logger
, mtl
, resourcet
, unliftio-core
default-language: Haskell2010
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
test-suite readme
type: exitcode-stdio-1.0
main-is: README.lhs
other-modules:
Paths_amazonka_mtl
default-extensions:
BangPatterns
DataKinds
DeriveAnyClass
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
NoImplicitPrelude
NoMonomorphismRestriction
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TypeApplications
TypeFamilies
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missed-specialisations -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-safe -Wno-unsafe -pgmL markdown-unlit
build-depends:
Blammo
, amazonka-core
, amazonka-mtl
, amazonka-s3
, base <5
, conduit
, lens
, markdown-unlit
, mtl
default-language: Haskell2010
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Control.Monad.AWSSpec
Paths_amazonka_mtl
hs-source-dirs:
tests
default-extensions:
BangPatterns
DataKinds
DeriveAnyClass
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
LambdaCase
MultiParamTypeClasses
NoImplicitPrelude
NoMonomorphismRestriction
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TypeApplications
TypeFamilies
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missed-specialisations -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-safe -Wno-unsafe -threaded -rtsopts "-with-rtsopts=-N"
build-depends:
amazonka-core
, amazonka-mtl
, amazonka-s3
, base <5
, hspec
, lens
, text
, time
default-language: Haskell2010
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module