Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit ghc-transformers-compat for openSUSE:Factory
Hello community,

here is the log from the commit of package ghc-transformers-compat for
openSUSE:Factory checked in at 2019-04-28 20:13:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-transformers-compat (Old)
and /work/SRC/openSUSE:Factory/.ghc-transformers-compat.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-transformers-compat"

Sun Apr 28 20:13:58 2019 rev:9 rq:698563 version:0.6.4

Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-transformers-compat/ghc-transformers-compat.changes
2018-10-25 09:06:40.430493056 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-transformers-compat.new.5536/ghc-transformers-compat.changes
2019-04-28 20:14:01.090397420 +0200
@@ -1,0 +2,24 @@
+Wed Apr 3 02:01:41 UTC 2019 - psimons@xxxxxxxx
+
+- Update transformers-compat to version 0.6.4.
+ 0.6.4 [2019.04.01]
+ ------------------
+ * Use more conservative CPP to guard the backported `MonadFix` instance for
+ `ListT`.
+
+-------------------------------------------------------------------
+Tue Apr 2 07:14:17 UTC 2019 - psimons@xxxxxxxx
+
+- Update transformers-compat to version 0.6.3.
+ 0.6.3 [2019.04.01]
+ ------------------
+ * Backport changes from `transformers-0.5.6.*`:
+ * Backport the `MonadFix` instance for `ListT` in
+ `Control.Monad.Trans.Instances`.
+ * Generalize the type of `except` in `Control.Monad.Trans.Except`.
+ * Backport `MonadFail` instances for `AccumT`, `Reverse`, and `SelectT` on
+ pre-8.0 versions of GHC by depending on the `fail` package if necessary.
+ * Backport `MonadFail` instances for monad transformer types in
+ `Control.Monad.Trans.Instances`.
+
+-------------------------------------------------------------------

Old:
----
transformers-compat-0.6.2.tar.gz

New:
----
transformers-compat-0.6.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-transformers-compat.spec ++++++
--- /var/tmp/diff_new_pack.qpjMec/_old 2019-04-28 20:14:01.698397043 +0200
+++ /var/tmp/diff_new_pack.qpjMec/_new 2019-04-28 20:14:01.702397039 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-transformers-compat
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@

%global pkg_name transformers-compat
Name: ghc-%{pkg_name}
-Version: 0.6.2
+Version: 0.6.4
Release: 0
Summary: A small compatibility shim for the transformers library
License: BSD-3-Clause

++++++ transformers-compat-0.6.2.tar.gz -> transformers-compat-0.6.4.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transformers-compat-0.6.2/.travis.yml
new/transformers-compat-0.6.4/.travis.yml
--- old/transformers-compat-0.6.2/.travis.yml 2018-05-11 20:17:38.000000000
+0200
+++ new/transformers-compat-0.6.4/.travis.yml 2001-09-09 03:46:40.000000000
+0200
@@ -1,11 +1,13 @@
# This Travis job script has been generated by a script via
#
-# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head'
'--cabal-install-version=2.2' '--jobs=2'
'--irc-channel=irc.freenode.org#haskell-lens' '--no-no-tests-no-bench'
'--no-install-dependencies' '--config=cabal.haskell-ci' 'cabal.project'
+# haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci'
'cabal.project'
#
-# For more information, see https://github.com/hvr/multi-ghc-travis
+# For more information, see https://github.com/haskell-CI/haskell-ci
+#
+# version: 0.2.1
#
language: c
-sudo: false
+dist: xenial

git:
submodules: false # whether to recursively clone submodules
@@ -24,45 +26,38 @@
- $HOME/.cabal/store

before_cache:
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
+ - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
+ - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
+ - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx

- - rm -rfv $HOME/.cabal/packages/head.hackage
+ - rm -rfv $CABALHOME/packages/head.hackage

matrix:
include:
- - compiler: "ghc-8.4.2"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.2],
sources: [hvr-ghc]}}
+ - compiler: "ghc-8.6.4"
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4],
sources: [hvr-ghc]}}
+ - compiler: "ghc-8.4.4"
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4],
sources: [hvr-ghc]}}
- compiler: "ghc-8.2.2"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-8.2.2],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2],
sources: [hvr-ghc]}}
- compiler: "ghc-8.0.2"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-8.0.2],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2],
sources: [hvr-ghc]}}
- compiler: "ghc-7.10.3"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-7.10.3],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3],
sources: [hvr-ghc]}}
- compiler: "ghc-7.8.4"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-7.8.4],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4],
sources: [hvr-ghc]}}
- compiler: "ghc-7.6.3"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-7.6.3],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3],
sources: [hvr-ghc]}}
- compiler: "ghc-7.4.2"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-7.4.2],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.4.2],
sources: [hvr-ghc]}}
- compiler: "ghc-7.2.2"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-7.2.2],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.2.2],
sources: [hvr-ghc]}}
- compiler: "ghc-7.0.4"
- # env: TEST=--disable-tests BENCH=--disable-benchmarks
- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.0,ghc-7.0.4],
sources: [hvr-ghc]}}
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.0.4],
sources: [hvr-ghc]}}
- compiler: "ghc-head"
env: GHCHEAD=true
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-head],
sources: [hvr-ghc]}}
@@ -71,51 +66,56 @@
- compiler: "ghc-head"

before_install:
- - HC=${CC}
+ - HC=/opt/ghc/bin/${CC}
- HCPKG=${HC/ghc/ghc-pkg}
- unset CC
+ - CABAL=/opt/ghc/bin/cabal
+ - CABALHOME=$HOME/.cabal
+ - export PATH="$CABALHOME/bin:$PATH"
- ROOTDIR=$(pwd)
- - mkdir -p $HOME/.local/bin
- - "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E
's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
- echo $HCNUMVER

install:
- - cabal --version
+ - ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2>
/dev/null || echo '?')]"
- - BENCH=${BENCH---enable-benchmarks}
- - TEST=${TEST---enable-tests}
- - HADDOCK=${HADDOCK-true}
- - INSTALLED=${INSTALLED-true}
+ - TEST=--enable-tests
+ - BENCH=--enable-benchmarks
- GHCHEAD=${GHCHEAD-false}
- - travis_retry cabal update -v
- - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
+ - travis_retry ${CABAL} update -v
+ - sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
- rm -fv cabal.project cabal.project.local
- - "sed -i.bak 's/^-- jobs:.*/jobs: 2/' ${HOME}/.cabal/config"
+ - "sed -i.bak 's/^-- jobs:.*/jobs: 2/' $CABALHOME/config"
# Overlay Hackage Package Index for GHC HEAD:
https://github.com/hvr/head.hackage
- |
if $GHCHEAD; then
- sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell,
*:ghc, *:Cabal/' ${HOME}/.cabal/config
+ sed -i 's/-- allow-newer: .*/allow-newer: *:base/' $CABALHOME/config
+ for pkg in $($HCPKG list --simple-output); do pkg=$(echo $pkg | sed
's/-[^-]*$//'); sed -i "s/allow-newer: /allow-newer: *:$pkg, /"
$CABALHOME/config; done

- echo 'repository head.hackage'
>> ${HOME}/.cabal/config
- echo ' url: http://head.hackage.haskell.org/'
>> ${HOME}/.cabal/config
- echo ' secure: True'
>> ${HOME}/.cabal/config
- echo ' root-keys:
07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740' >>
${HOME}/.cabal/config
- echo '
2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb' >>
${HOME}/.cabal/config
- echo '
8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >>
${HOME}/.cabal/config
- echo ' key-threshold: 3'
>> ${HOME}/.cabal.config
+ echo 'repository head.hackage'
>> $CABALHOME/config
+ echo ' url: http://head.hackage.haskell.org/'
>> $CABALHOME/config
+ echo ' secure: True'
>> $CABALHOME/config
+ echo ' root-keys:
07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740' >>
$CABALHOME/config
+ echo '
2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb' >>
$CABALHOME/config
+ echo '
8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >>
$CABALHOME/config
+ echo ' key-threshold: 3'
>> $CABALHOME.config

- cabal new-update head.hackage -v
- fi
- - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- - "printf 'packages: \".\" \"./tests\"\\n' > cabal.project"
- - cat cabal.project
- - if [ -f "./configure.ac" ]; then
- (cd "." && autoreconf -i);
- fi
- - if [ -f "./tests/configure.ac" ]; then
- (cd "./tests" && autoreconf -i);
+ grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
+
+ ${CABAL} new-update head.hackage -v
fi
+ - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
+ - rm -f cabal.project
+ - touch cabal.project
+ - "printf 'packages: \".\"\\n' >> cabal.project"
+ - "printf 'packages: \"./tests\"\\n' >> cabal.project"
+ - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
+ - touch cabal.project.local
+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed
's/-[^-]*$//' | grep -vE -- '^(transformers-compat|transformers-compat-tests)$'
| sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
+ - cat cabal.project || true
+ - cat cabal.project.local || true
+ - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
+ - if [ -f "./tests/configure.ac" ]; then (cd "./tests" && autoreconf -i); fi
- rm -f cabal.project.freeze
- rm -rf .ghc.environment.* "."/dist "./tests"/dist
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
@@ -124,43 +124,64 @@
# any command which exits with a non-zero exit code causes the build to fail.
script:
# test that source-distributions can be generated
- - (cd "." && cabal sdist)
- - (cd "./tests" && cabal sdist)
- - mv "."/dist/transformers-compat-*.tar.gz
"./tests"/dist/transformers-compat-tests-*.tar.gz ${DISTDIR}/
+ - ${CABAL} new-sdist all
+ - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- - "printf 'packages: transformers-compat-*/*.cabal
transformers-compat-tests-*/*.cabal\\n' > cabal.project"
- - cat cabal.project
-
- # Build with installed constraints for packages in global-db
- - if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests
--disable-benchmarks $(${HCPKG} list --global --simple-output --names-only |
sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else
echo "Not building with installed constraints"; fi
+ - rm -f cabal.project
+ - touch cabal.project
+ - "printf 'packages: \"transformers-compat-*/*.cabal\"\\n' >> cabal.project"
+ - "printf 'packages: \"transformers-compat-tests-*/*.cabal\"\\n' >>
cabal.project"
+ - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
+ - touch cabal.project.local
+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed
's/-[^-]*$//' | grep -vE -- '^(transformers-compat|transformers-compat-tests)$'
| sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
+ - cat cabal.project || true
+ - cat cabal.project.local || true

# build & run tests, build benchmarks
- - cabal new-build -w ${HC} ${TEST} ${BENCH} all
- - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST}
${BENCH} all; fi
+ - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
+ - if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC}
${TEST} ${BENCH} all; fi

# cabal check
- - (cd transformers-compat-* && cabal check)
- - (cd transformers-compat-tests-* && cabal check)
+ - (cd transformers-compat-* && ${CABAL} check)
+ - (cd transformers-compat-tests-* && ${CABAL} check)

# haddock
- - rm -rf ./dist-newstyle
- - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else
echo "Skipping haddock generation";fi
+ - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
+
+ # Build without installed constraints for packages in global-db
+ - rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests
--disable-benchmarks all;
+
+ # Constraint sets
+ - rm -rf cabal.project.local

# Constraint set no-mtl
- - if [ $HCNUMVER -ge 0 ]; then cabal new-build -w ${HC} --disable-tests
--disable-benchmarks --constraint='transformers-compat -mtl' all; else echo
skipping...; fi
+ - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks
--constraint='transformers-compat -mtl' all

# Constraint set no-generic-deriving
- - if [ $HCNUMVER -ge 0 ]; then cabal new-build -w ${HC} --disable-tests
--disable-benchmarks --constraint='transformers-compat -generic-deriving' all;
else echo skipping...; fi
+ - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks
--constraint='transformers-compat -generic-deriving' all

# Constraint set no-mtl-no-generic-deriving
- - if [ $HCNUMVER -ge 0 ]; then cabal new-build -w ${HC} --disable-tests
--disable-benchmarks --constraint='transformers-compat -generic-deriving'
--constraint='tranformers-compat -mtl' all; else echo skipping...; fi
+ - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks
--constraint='transformers-compat -generic-deriving'
--constraint='tranformers-compat -mtl' all
+
+ # Constraint set two
+ - if [ $HCNUMVER -lt 70900 ] ; then ${CABAL} new-build -w ${HC}
--disable-tests --disable-benchmarks --constraint='transformers-compat +two'
all ; fi
+
+ # Constraint set three
+ - if [ $HCNUMVER -lt 70900 ] ; then ${CABAL} new-build -w ${HC}
--disable-tests --disable-benchmarks --constraint='transformers-compat +three'
all ; fi
+
+ # Constraint set four
+ - if [ $HCNUMVER -lt 71100 ] ; then ${CABAL} new-build -w ${HC}
--disable-tests --disable-benchmarks --constraint='transformers-compat +four'
all ; fi
+
+ # Constraint set five
+ - if [ $HCNUMVER -lt 80300 ] ; then ${CABAL} new-build -w ${HC}
--disable-tests --disable-benchmarks --constraint='transformers-compat +five'
all ; fi

# Constraint set transformers-installed
- - if [ $HCNUMVER -ge 70800 ]; then cabal new-build -w ${HC} --disable-tests
--disable-benchmarks --constraint='transformers installed' all; else echo
skipping...; fi
+ - if [ $HCNUMVER -ge 70800 ] ; then ${CABAL} new-build -w ${HC}
--disable-tests --disable-benchmarks --constraint='transformers installed' all
; fi

# Constraint set transformers-newer
- - if [ $HCNUMVER -ge 0 ] && [ $HCNUMVER -lt 80500 ]; then cabal new-build -w
${HC} --disable-tests --disable-benchmarks --constraint='transformers
=0.5.5.0' all; else echo skipping...; fi
+ - if [ $HCNUMVER -lt 80500 ] ; then ${CABAL} new-build -w ${HC}
--disable-tests --disable-benchmarks --constraint='transformers >=0.5.5.0' all
; fi
+

-# REGENDATA
["-o",".travis.yml","--ghc-head","--cabal-install-version=2.2","--jobs=2","--irc-channel=irc.freenode.org#haskell-lens","--no-no-tests-no-bench","--no-install-dependencies","--config=cabal.haskell-ci","cabal.project"]
+# REGENDATA
["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"]
# EOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transformers-compat-0.6.2/0.3/Control/Monad/Trans/Except.hs
new/transformers-compat-0.6.4/0.3/Control/Monad/Trans/Except.hs
--- old/transformers-compat-0.6.2/0.3/Control/Monad/Trans/Except.hs
2018-05-11 20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/0.3/Control/Monad/Trans/Except.hs
2001-09-09 03:46:40.000000000 +0200
@@ -62,6 +62,7 @@

import Control.Applicative
import Control.Monad
+import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Control.Monad.IO.Class
import Control.Monad.Signatures
@@ -95,8 +96,8 @@

-- | Constructor for computations in the exception monad.
-- (The inverse of 'runExcept').
-except :: Either e a -> Except e a
-except m = ExceptT (Identity m)
+except :: (Monad m) => Either e a -> ExceptT e m a
+except m = ExceptT (return m)
{-# INLINE except #-}

-- | Extractor for computations in the exception monad.
@@ -229,6 +230,10 @@
fail = ExceptT . fail
{-# INLINE fail #-}

+instance (Fail.MonadFail m) => Fail.MonadFail (ExceptT e m) where
+ fail = ExceptT . Fail.fail
+ {-# INLINE fail #-}
+
instance (Monad m, Monoid e) => MonadPlus (ExceptT e m) where
mzero = ExceptT $ return (Left mempty)
{-# INLINE mzero #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transformers-compat-0.6.2/0.5/Control/Monad/Trans/Accum.hs
new/transformers-compat-0.6.4/0.5/Control/Monad/Trans/Accum.hs
--- old/transformers-compat-0.6.2/0.5/Control/Monad/Trans/Accum.hs
2018-05-11 20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/0.5/Control/Monad/Trans/Accum.hs
2001-09-09 03:46:40.000000000 +0200
@@ -73,9 +73,7 @@

import Control.Applicative
import Control.Monad
-#if MIN_VERSION_base(4,9,0)
import qualified Control.Monad.Fail as Fail
-#endif
import Control.Monad.Fix
import Control.Monad.Signatures
#if !MIN_VERSION_base(4,8,0)
@@ -210,11 +208,9 @@
fail msg = AccumT $ const (fail msg)
{-# INLINE fail #-}

-#if MIN_VERSION_base(4,9,0)
-instance (Monoid w, Fail.MonadFail m) => Fail.MonadFail (AccumT w m) where
+instance (Monoid w, Functor m, Fail.MonadFail m) => Fail.MonadFail (AccumT w
m) where
fail msg = AccumT $ const (Fail.fail msg)
{-# INLINE fail #-}
-#endif

instance (Monoid w, Functor m, MonadPlus m) => MonadPlus (AccumT w m) where
mzero = AccumT $ const mzero
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transformers-compat-0.6.2/0.5/Control/Monad/Trans/Select.hs
new/transformers-compat-0.6.4/0.5/Control/Monad/Trans/Select.hs
--- old/transformers-compat-0.6.2/0.5/Control/Monad/Trans/Select.hs
2018-05-11 20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/0.5/Control/Monad/Trans/Select.hs
2001-09-09 03:46:40.000000000 +0200
@@ -58,9 +58,7 @@

import Control.Applicative
import Control.Monad
-#if MIN_VERSION_base(4,9,0)
import qualified Control.Monad.Fail as Fail
-#endif
import Data.Functor.Identity

#if !defined(HASKELL98) && __GLASGOW_HASKELL__ >= 708
@@ -142,11 +140,9 @@
h y
{-# INLINE (>>=) #-}

-#if MIN_VERSION_base(4,9,0)
instance (Fail.MonadFail m) => Fail.MonadFail (SelectT r m) where
fail msg = lift (Fail.fail msg)
{-# INLINE fail #-}
-#endif

instance (MonadPlus m) => MonadPlus (SelectT r m) where
mzero = SelectT (const mzero)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transformers-compat-0.6.2/CHANGELOG.markdown
new/transformers-compat-0.6.4/CHANGELOG.markdown
--- old/transformers-compat-0.6.2/CHANGELOG.markdown 2018-05-11
20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/CHANGELOG.markdown 2001-09-09
03:46:40.000000000 +0200
@@ -1,3 +1,19 @@
+0.6.4 [2019.04.01]
+------------------
+* Use more conservative CPP to guard the backported `MonadFix` instance for
+ `ListT`.
+
+0.6.3 [2019.04.01]
+------------------
+* Backport changes from `transformers-0.5.6.*`:
+ * Backport the `MonadFix` instance for `ListT` in
+ `Control.Monad.Trans.Instances`.
+ * Generalize the type of `except` in `Control.Monad.Trans.Except`.
+* Backport `MonadFail` instances for `AccumT`, `Reverse`, and `SelectT` on
+ pre-8.0 versions of GHC by depending on the `fail` package if necessary.
+* Backport `MonadFail` instances for monad transformer types in
+ `Control.Monad.Trans.Instances`.
+
0.6.2
-----
* `transformers-compat` now uses automatic flags instead of manual ones.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transformers-compat-0.6.2/README.markdown
new/transformers-compat-0.6.4/README.markdown
--- old/transformers-compat-0.6.2/README.markdown 2018-05-11
20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/README.markdown 2001-09-09
03:46:40.000000000 +0200
@@ -7,6 +7,14 @@

This enables users to maintain haskell-platform compatibility, while still
gaining access ot the new functionality.

+Related packages
+----------------
+The `writer-cps-transformers` package backports the
+`Control.Monad.Trans.{RWS,Writer}.CPS` modules that were introduced in
+`transformers-0.5.6.0`. There are also a variety of companion packages which
+backport orphan instances for these types. One example is `writer-cps-mtl`,
+which backports instances of type classes from the `mtl` library.
+
Contact Information
-------------------

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transformers-compat-0.6.2/src/Control/Monad/Trans/Instances.hs
new/transformers-compat-0.6.4/src/Control/Monad/Trans/Instances.hs
--- old/transformers-compat-0.6.2/src/Control/Monad/Trans/Instances.hs
2018-05-11 20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/src/Control/Monad/Trans/Instances.hs
2001-09-09 03:46:40.000000000 +0200
@@ -47,17 +47,20 @@

import Control.Applicative.Backwards (Backwards(..))
import Control.Applicative.Lift (Lift(..))
+import qualified Control.Monad.Fail as Fail (MonadFail(..))
import Control.Monad.IO.Class (MonadIO)
-import Control.Monad.Trans.Class (MonadTrans)
+import Control.Monad.Trans.Accum (AccumT(..))
+import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Monad.Trans.Cont (ContT(..))
-import Control.Monad.Trans.Error (ErrorT(..))
-import Control.Monad.Trans.Except ()
+import Control.Monad.Trans.Error (Error(..), ErrorT(..))
+import Control.Monad.Trans.Except (ExceptT(..))
import Control.Monad.Trans.Identity (IdentityT(..))
-import Control.Monad.Trans.List (ListT(..))
+import Control.Monad.Trans.List (ListT(..), mapListT)
import Control.Monad.Trans.Maybe (MaybeT(..))
import qualified Control.Monad.Trans.RWS.Lazy as Lazy (RWST(..))
import qualified Control.Monad.Trans.RWS.Strict as Strict (RWST(..))
import Control.Monad.Trans.Reader (ReaderT(..))
+import Control.Monad.Trans.Select (SelectT(..))
import qualified Control.Monad.Trans.State.Lazy as Lazy (StateT(..))
import qualified Control.Monad.Trans.State.Strict as Strict (StateT(..))
import qualified Control.Monad.Trans.Writer.Lazy as Lazy (WriterT(..))
@@ -72,7 +75,7 @@

import Control.Applicative
import Control.Arrow (Arrow((***)))
-import Control.Monad (MonadPlus(..))
+import Control.Monad (MonadPlus(..), liftM)
import Control.Monad.Fix (MonadFix(..))
import Data.Bits
import Data.Foldable (Foldable(..))
@@ -96,7 +99,6 @@
#endif

#if MIN_VERSION_base(4,9,0)
-import qualified Control.Monad.Fail as Fail (MonadFail(..))
import qualified Data.Semigroup as Semigroup (Semigroup(..))
#endif

@@ -210,6 +212,73 @@
showsPrec1 d (Const x) = showsUnary "Const" d x
#endif

+#if !(MIN_VERSION_transformers(0,5,0)) \
+ || (MIN_VERSION_transformers(0,5,0) && !(MIN_VERSION_base(4,9,0)))
+-- MonadFail instances
+instance (Fail.MonadFail m) => Fail.MonadFail (ContT r m) where
+ fail msg = ContT $ \ _ -> Fail.fail msg
+ {-# INLINE fail #-}
+
+instance (Monad m, Error e) => Fail.MonadFail (ErrorT e m) where
+ fail msg = ErrorT $ return (Left (strMsg msg))
+
+instance (Fail.MonadFail m) => Fail.MonadFail (IdentityT m) where
+ fail msg = IdentityT $ Fail.fail msg
+ {-# INLINE fail #-}
+
+instance (Monad m) => Fail.MonadFail (ListT m) where
+ fail _ = ListT $ return []
+ {-# INLINE fail #-}
+
+instance (Monad m) => Fail.MonadFail (MaybeT m) where
+ fail _ = MaybeT (return Nothing)
+ {-# INLINE fail #-}
+
+instance (Fail.MonadFail m) => Fail.MonadFail (ReaderT r m) where
+ fail msg = lift (Fail.fail msg)
+ {-# INLINE fail #-}
+
+instance (Monoid w, Fail.MonadFail m) => Fail.MonadFail (Lazy.RWST r w s m)
where
+ fail msg = Lazy.RWST $ \ _ _ -> Fail.fail msg
+ {-# INLINE fail #-}
+
+instance (Monoid w, Fail.MonadFail m) => Fail.MonadFail (Strict.RWST r w s m)
where
+ fail msg = Strict.RWST $ \ _ _ -> Fail.fail msg
+ {-# INLINE fail #-}
+
+instance (Fail.MonadFail m) => Fail.MonadFail (Lazy.StateT s m) where
+ fail str = Lazy.StateT $ \ _ -> Fail.fail str
+ {-# INLINE fail #-}
+
+instance (Fail.MonadFail m) => Fail.MonadFail (Strict.StateT s m) where
+ fail str = Strict.StateT $ \ _ -> Fail.fail str
+ {-# INLINE fail #-}
+
+instance (Monoid w, Fail.MonadFail m) => Fail.MonadFail (Lazy.WriterT w m)
where
+ fail msg = Lazy.WriterT $ Fail.fail msg
+ {-# INLINE fail #-}
+
+instance (Monoid w, Fail.MonadFail m) => Fail.MonadFail (Strict.WriterT w m)
where
+ fail msg = Strict.WriterT $ Fail.fail msg
+ {-# INLINE fail #-}
+
+# if MIN_VERSION_transformers(0,5,0) && !(MIN_VERSION_base(4,9,0))
+instance (Fail.MonadFail m) => Fail.MonadFail (ExceptT e m) where
+ fail = ExceptT . Fail.fail
+ {-# INLINE fail #-}
+
+# if MIN_VERSION_transformers(0,5,3)
+instance (Monoid w, Functor m, Fail.MonadFail m) => Fail.MonadFail (AccumT w
m) where
+ fail msg = AccumT $ const (Fail.fail msg)
+ {-# INLINE fail #-}
+
+instance (Fail.MonadFail m) => Fail.MonadFail (SelectT r m) where
+ fail msg = lift (Fail.fail msg)
+ {-# INLINE fail #-}
+# endif
+# endif
+#endif
+
#if !(MIN_VERSION_transformers(0,5,0))
-- Monoid Constant instance
instance (Monoid a) => Monoid (Constant a b) where
@@ -505,11 +574,9 @@
fail msg = Reverse (fail msg)
{-# INLINE fail #-}

-# if MIN_VERSION_base(4,9,0)
instance (Fail.MonadFail m) => Fail.MonadFail (Reverse m) where
fail msg = Reverse (Fail.fail msg)
{-# INLINE fail #-}
-# endif

instance (MonadPlus m) => MonadPlus (Reverse m) where
mzero = Reverse mzero
@@ -537,6 +604,12 @@
Constant x <> Constant y = Constant (x Semigroup.<> y)
{-# INLINE (<>) #-}
# endif
+
+instance (MonadFix m) => MonadFix (ListT m) where
+ mfix f = ListT $ mfix (runListT . f . head) >>= \ xs -> case xs of
+ [] -> return []
+ x:_ -> liftM (x:) (runListT (mfix (mapListT (liftM tail) . f)))
+ {-# INLINE mfix #-}
#endif

-- Generic(1) instances
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transformers-compat-0.6.2/tests/transformers-compat-tests.cabal
new/transformers-compat-0.6.4/tests/transformers-compat-tests.cabal
--- old/transformers-compat-0.6.2/tests/transformers-compat-tests.cabal
2018-05-11 20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/tests/transformers-compat-tests.cabal
2001-09-09 03:46:40.000000000 +0200
@@ -21,7 +21,8 @@
, GHC == 7.10.3
, GHC == 8.0.2
, GHC == 8.2.2
- , GHC == 8.4.2
+ , GHC == 8.4.4
+ , GHC == 8.6.4

source-repository head
type: git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transformers-compat-0.6.2/transformers-compat.cabal
new/transformers-compat-0.6.4/transformers-compat.cabal
--- old/transformers-compat-0.6.2/transformers-compat.cabal 2018-05-11
20:17:38.000000000 +0200
+++ new/transformers-compat-0.6.4/transformers-compat.cabal 2001-09-09
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
name: transformers-compat
category: Compatibility
-version: 0.6.2
+version: 0.6.4
license: BSD3
cabal-version: >= 1.8
license-file: LICENSE
@@ -31,7 +31,8 @@
, GHC == 7.10.3
, GHC == 8.0.2
, GHC == 8.2.2
- , GHC == 8.4.2
+ , GHC == 8.4.4
+ , GHC == 8.6.4
extra-source-files:
.travis.yml
.ghci
@@ -95,6 +96,8 @@
-- each flag below splits this interval into two parts.
-- flag-true parts are mutually exclusive, so at least one have to be on.
transformers >= 0.2 && <0.6
+ if !impl(ghc >= 8.0)
+ build-depends: fail == 4.9.*

hs-source-dirs:
src
@@ -107,7 +110,6 @@

-- automatic flags
if flag(five-three)
- hs-source-dirs: 0.5
build-depends: transformers >= 0.5.3
else
build-depends: transformers < 0.5.3


< Previous Next >
This Thread
  • No further messages