packages feed

cabal-cache-1.0.1.3: src/HaskellWorks/CabalCache/Error.hs

module HaskellWorks.CabalCache.Error
  ( nothingToError
  ) where

import Control.Monad.Except

nothingToError :: MonadError e m => e -> Maybe a -> m a
nothingToError _ (Just a) = return a
nothingToError e Nothing  = throwError e