packages feed

octohat 0.1.4.2 → 0.1.5.0

raw patch · 2 files changed

+15/−2 lines, 2 filesdep ~errorsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: errors

API changes (from Hackage documentation)

- Network.Octohat.Types: type GitHub = EitherT GitHubReturnStatus (ReaderT BearerToken (StateT Pagination IO))
+ Network.Octohat.Types: type GitHub = ExceptT GitHubReturnStatus (ReaderT BearerToken (StateT Pagination IO))

Files

octohat.cabal view
@@ -1,7 +1,7 @@ Name:                octohat Synopsis:            A tested, minimal wrapper around GitHub's API. Description:         A tested, minimal wrapper around GitHub's API.-Version:             0.1.4.2+Version:             0.1.5.0 License:             MIT License-file:        LICENSE Author:              Stack Builders@@ -27,7 +27,7 @@     , cryptohash           == 0.11.*     , dotenv               == 0.1.*     , either               == 4.3.*-    , errors               == 1.4.*+    , errors               >= 1.4 && < 2.1     , ghc-prim             >= 0.2     , http-client          == 0.4.*     , http-types           == 0.8.*
src/Network/Octohat/Types.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell   #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE CPP               #-}  module Network.Octohat.Types ( Member(..)                              , MemberWithKey(..)@@ -27,7 +28,11 @@ import Control.Applicative import Control.Monad.Reader (ReaderT(..)) import Control.Monad.State (StateT(..), evalStateT)+#if MIN_VERSION_errors(2,0,0)+import Control.Monad.Trans.Except (ExceptT, runExceptT)+#else import Control.Monad.Trans.Either+#endif import Data.Aeson import Data.Aeson.TH import Data.Char (toLower)@@ -218,12 +223,20 @@  -- | The monad transformer where all operations run. Supports initial configuration --   through a Reader monad and the possibility of failure through Either+#if MIN_VERSION_errors(2,0,0)+type GitHub = ExceptT GitHubReturnStatus (ReaderT BearerToken (StateT Pagination IO))+#else type GitHub = EitherT GitHubReturnStatus (ReaderT BearerToken (StateT Pagination IO))+#endif  -- | Executes a computation built within the GitHub monad returning an Either within --   the IO data type using the provided token runGitHub' :: GitHub a -> BearerToken -> IO (Either GitHubReturnStatus a)+#if MIN_VERSION_errors(2,0,0)+runGitHub' comp token = evalStateT (runReaderT (runExceptT comp) token) defPagination+#else runGitHub' comp token = evalStateT (runReaderT (runEitherT comp) token) defPagination+#endif  -- | Executes a computation built within the GitHub monad returning an Either within --   the IO data type. Reads an API token from an environment variable named GITHUB_TOKEN