valpackett / magicbane

A web framework that integrates Servant, EKG, fast-logger, wai-cli… | now on https://codeberg.org/valpackett/magicbane

Home Page:https://codeberg.org/valpackett/magicbane

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call for Testing: No more ExceptT

valpackett opened this issue · comments

Magicbane git master is now ExceptT-free. (More explanation in the 209cfbf commit message.) The new method of throwing errors is throwIO.

Please test your applications!

/cc @tejon

Building with lts-10.9 (old conduit) I get the following errors:

    /library/Magicbane/HTTPClient.hs:68:79: error:
        Not in scope: type constructor or class ‘ConduitT’
        Perhaps you meant one of these:
          ‘Conduit’ (imported from Data.Conduit),
          ‘ConduitM’ (imported from Data.Conduit)
       |
    68 | performWithFn ∷ (MonadHTTP ψ μ, MonadCatch μ) ⇒ (ConduitM ι ByteString μ () → ConduitT () Void μ ρ) → Request → ExceptT Text μ (Response ρ)
       |                                                                               ^^^^^^^^
    
    /library/Magicbane/HTTPClient.hs:68:91: error:
        Not in scope: type constructor or class ‘Void’
       |
    68 | performWithFn ∷ (MonadHTTP ψ μ, MonadCatch μ) ⇒ (ConduitM ι ByteString μ () → ConduitT () Void μ ρ) → Request → ExceptT Text μ (Response ρ)
       |                                                                                           ^^^^

Not sure whether this is avoidable without a whole bunch of CPP, though.

I'm probably not going to support old conduit…

I'm probably not going to support old conduit…

Good enough for me, just making a thorough report. :)

On the positive side: switching throwError to throwIO fixed my build, didn't even need to change any signatures.