From 8d72a788e5598244eafd63b1f876f48798be6fea Mon Sep 17 00:00:00 2001 From: James Cranch Date: Thu, 6 Jan 2022 12:28:42 +0000 Subject: [PATCH 1/2] Added instance of FunctorWithIndex for Kleisli --- indexed-traversable/src/WithIndex.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indexed-traversable/src/WithIndex.hs b/indexed-traversable/src/WithIndex.hs index 9b9845d..947c54e 100644 --- a/indexed-traversable/src/WithIndex.hs +++ b/indexed-traversable/src/WithIndex.hs @@ -24,6 +24,7 @@ import Prelude import Control.Applicative (Applicative (..), Const (..), ZipList (..), (<$>), liftA2) import Control.Applicative.Backwards (Backwards (..)) +import Control.Arrow (Kleisli (..)) import Control.Monad.Trans.Identity (IdentityT (..)) import Control.Monad.Trans.Reader (ReaderT (..)) import Data.Array (Array) @@ -280,6 +281,10 @@ instance TraversableWithIndex Int ZipList where itraverse f (ZipList xs) = ZipList <$> itraverse f xs {-# INLINE itraverse #-} +instance Functor m => FunctorWithIndex a (Kleisli m a) where + imap f (Kleisli p) = Kleisli (\x -> f x <$> p x) + {-# INLINE imap #-} + ------------------------------------------------------------------------------- -- (former) semigroups ------------------------------------------------------------------------------- @@ -296,7 +301,7 @@ instance TraversableWithIndex Int NonEmpty where {-# INLINE itraverse #-} ------------------------------------------------------------------------------- --- Functors (formely) from transformers +-- Functors (formerly) from transformers ------------------------------------------------------------------------------- instance FunctorWithIndex () Identity where From fff4ee31ba18dd4b1afa2dc23f35cd8a1ae22bde Mon Sep 17 00:00:00 2001 From: James Cranch Date: Sun, 20 Feb 2022 18:15:13 +0000 Subject: [PATCH 2/2] New CI script --- .github/workflows/haskell-ci.yml | 10 ++++++++-- haskell-ci.sh | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index cb38aec..1dfa2de 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.13.20211030 +# version: 0.14.2 # -# REGENDATA ("0.13.20211030",["--config=cabal.haskell-ci","github","cabal.project"]) +# REGENDATA ("0.14.2",["--config=cabal.haskell-ci","github","cabal.project"]) # name: Haskell-CI on: @@ -24,6 +24,8 @@ jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} runs-on: ubuntu-18.04 + timeout-minutes: + 60 container: image: buildpack-deps:bionic continue-on-error: ${{ matrix.allow-failure }} @@ -179,6 +181,10 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + cat >> $CABAL_CONFIG <