summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-06-29 15:35:09 -0400
committerAndrew Cady <d@jerkface.net>2019-06-29 15:35:09 -0400
commitdd57a30831bda84f70ef43f1ed9d9bc90e0ee5e5 (patch)
tree4b2da1d8fbb264cf14d8684e408461276b46f528
parent1fbfd083ae140db1fde6edfa1c1934babb115f24 (diff)
update stackage to lts-13.26
-rw-r--r--src/Network/ACME.hs8
-rw-r--r--stack.yaml2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/ACME.hs b/src/Network/ACME.hs
index 5ea6ff8..35eebcb 100644
--- a/src/Network/ACME.hs
+++ b/src/Network/ACME.hs
@@ -70,9 +70,9 @@ certify directoryUrl keys reg domainKeys domains = do
70 70
71 cr dom = challengeRequest dom >>= statusReport >>= extractCR >>= performChallenge dom 71 cr dom = challengeRequest dom >>= statusReport >>= extractCR >>= performChallenge dom
72 72
73 runResourceT $ do 73 do
74 challengeResultLinks <- forM (map fst domains) cr 74 challengeResultLinks <- forM (map fst domains) cr
75 lift . runExceptT $ do 75 runExceptT $ do
76 ExceptT $ pollResults challengeResultLinks <&> left ("certificate receipt was not attempted because a challenge failed: " ++) 76 ExceptT $ pollResults challengeResultLinks <&> left ("certificate receipt was not attempted because a challenge failed: " ++)
77 ExceptT $ retrieveCert certReq >>= statusReport <&> checkCertResponse 77 ExceptT $ retrieveCert certReq >>= statusReport <&> checkCertResponse
78 78
@@ -154,12 +154,12 @@ data Directory = Directory {
154} 154}
155newtype Nonce = Nonce String 155newtype Nonce = Nonce String
156data Env = Env { getDir :: Directory, getKeys :: Keys, getSession :: WS.Session } 156data Env = Env { getDir :: Directory, getKeys :: Keys, getSession :: WS.Session }
157type ACME = RWST Env () Nonce IO 157type ACME = RWST Env () Nonce ResIO
158 158
159runACME :: URI -> Keys -> ACME a -> IO a 159runACME :: URI -> Keys -> ACME a -> IO a
160runACME url keys f = WS.withSession $ \sess -> do 160runACME url keys f = WS.withSession $ \sess -> do
161 Just (dir, nonce) <- getDirectory sess (show url) 161 Just (dir, nonce) <- getDirectory sess (show url)
162 fst <$> evalRWST f (Env dir keys sess) nonce 162 runResourceT $ fst <$> evalRWST f (Env dir keys sess) nonce
163 163
164post :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => String -> LC.ByteString -> m (Response LC.ByteString) 164post :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => String -> LC.ByteString -> m (Response LC.ByteString)
165post url payload = do 165post url payload = do
diff --git a/stack.yaml b/stack.yaml
index dcef853..a46cf9b 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,7 +1,7 @@
1# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md 1# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
2 2
3# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) 3# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
4resolver: lts-10.10 4resolver: lts-13.26
5 5
6# Local packages, usually specified by relative directory name 6# Local packages, usually specified by relative directory name
7packages: 7packages: