diff options
author | Andrew Cady <d@jerkface.net> | 2019-06-29 15:35:09 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-06-29 15:35:09 -0400 |
commit | dd57a30831bda84f70ef43f1ed9d9bc90e0ee5e5 (patch) | |
tree | 4b2da1d8fbb264cf14d8684e408461276b46f528 | |
parent | 1fbfd083ae140db1fde6edfa1c1934babb115f24 (diff) |
update stackage to lts-13.26
-rw-r--r-- | src/Network/ACME.hs | 8 | ||||
-rw-r--r-- | stack.yaml | 2 |
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 | } |
155 | newtype Nonce = Nonce String | 155 | newtype Nonce = Nonce String |
156 | data Env = Env { getDir :: Directory, getKeys :: Keys, getSession :: WS.Session } | 156 | data Env = Env { getDir :: Directory, getKeys :: Keys, getSession :: WS.Session } |
157 | type ACME = RWST Env () Nonce IO | 157 | type ACME = RWST Env () Nonce ResIO |
158 | 158 | ||
159 | runACME :: URI -> Keys -> ACME a -> IO a | 159 | runACME :: URI -> Keys -> ACME a -> IO a |
160 | runACME url keys f = WS.withSession $ \sess -> do | 160 | runACME 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 | ||
164 | post :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => String -> LC.ByteString -> m (Response LC.ByteString) | 164 | post :: (MonadReader Env m, MonadState Nonce m, MonadIO m) => String -> LC.ByteString -> m (Response LC.ByteString) |
165 | post url payload = do | 165 | post url payload = do |
@@ -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) |
4 | resolver: lts-10.10 | 4 | resolver: lts-13.26 |
5 | 5 | ||
6 | # Local packages, usually specified by relative directory name | 6 | # Local packages, usually specified by relative directory name |
7 | packages: | 7 | packages: |