packages feed

free 5.1.3 → 5.1.4

raw patch · 9 files changed

+95/−123 lines, 9 filesdep +th-abstractiondep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependencies added: th-abstraction

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

Files

.travis.yml view
@@ -2,9 +2,13 @@ # #   haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci' 'cabal.project' #+# To regenerate the script (for example after adjusting tested-with) run+#+#   haskell-ci regenerate+# # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.9.20191126+# version: 0.10 # version: ~> 1.0 language: c@@ -19,7 +23,7 @@       - irc.freenode.org#haskell-lens     skip_join: true     template:-      - "\"\\x0313free\\x03/\\x0306%{branch}\\x03 \\x0314%{commit}\\x03 %{build_url} %{message}\""+      - "\x0313free\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}" cache:   directories:     - $HOME/.cabal/packages@@ -37,41 +41,35 @@ jobs:   include:     - compiler: ghc-8.10.1-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.1","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.1","cabal-install-3.2"]}}       os: linux-    - compiler: ghc-8.8.1-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0"]}}+    - compiler: ghc-8.8.3+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}       os: linux     - compiler: ghc-8.6.5-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}       os: linux     - compiler: ghc-8.4.4-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}       os: linux     - compiler: ghc-8.2.2-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}       os: linux     - compiler: ghc-8.0.2-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}       os: linux     - compiler: ghc-7.10.3-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.3","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.3","cabal-install-3.2"]}}       os: linux     - compiler: ghc-7.8.4-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.2"]}}       os: linux     - compiler: ghc-7.6.3-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.6.3","cabal-install-3.0"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.6.3","cabal-install-3.2"]}}       os: linux     - compiler: ghc-7.4.2-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.4.2","cabal-install-3.0"]}}-      os: linux-    - compiler: ghc-head-      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-head","cabal-install-head"]}}+      addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.4.2","cabal-install-3.2"]}}       os: linux-  allow_failures:-    - compiler: ghc-head-    - compiler: ghc-8.10.1 before_install:   - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')   - WITHCOMPILER="-w $HC"@@ -84,69 +82,31 @@   - TOP=$(pwd)   - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"   - echo $HCNUMVER-  - CABAL="$CABAL -vnormal+nowrap+markoutput"+  - CABAL="$CABAL -vnormal+nowrap"   - set -o pipefail-  - |-    echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }'           >> .colorful.awk-    echo 'BEGIN { state = "output"; }'                                     >> .colorful.awk-    echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }'            >> .colorful.awk-    echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }'             >> .colorful.awk-    echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk-    echo '  if (state == "cabal") {'                                       >> .colorful.awk-    echo '    print blue($0)'                                              >> .colorful.awk-    echo '  } else {'                                                      >> .colorful.awk-    echo '    print $0'                                                    >> .colorful.awk-    echo '  }'                                                             >> .colorful.awk-    echo '}'                                                               >> .colorful.awk-  - cat .colorful.awk-  - |-    color_cabal_output () {-      awk -f $TOP/.colorful.awk-    }-  - echo text | color_cabal_output-install:-  - ${CABAL} --version-  - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"   - TEST=--enable-tests   - BENCH=--enable-benchmarks   - HEADHACKAGE=false-  - if [ $HCNUMVER -ge 81000 ] ; then HEADHACKAGE=true ; fi   - rm -f $CABALHOME/config   - |-    echo "verbose: normal +nowrap +markoutput"                                  >> $CABALHOME/config-    echo "remote-build-reporting: anonymous"                                    >> $CABALHOME/config-    echo "write-ghc-environment-files: always"                                  >> $CABALHOME/config-    echo "remote-repo-cache: $CABALHOME/packages"                               >> $CABALHOME/config-    echo "logs-dir:          $CABALHOME/logs"                                   >> $CABALHOME/config-    echo "world-file:        $CABALHOME/world"                                  >> $CABALHOME/config-    echo "extra-prog-path:   $CABALHOME/bin"                                    >> $CABALHOME/config-    echo "symlink-bindir:    $CABALHOME/bin"                                    >> $CABALHOME/config-    echo "installdir:        $CABALHOME/bin"                                    >> $CABALHOME/config-    echo "build-summary:     $CABALHOME/logs/build.log"                         >> $CABALHOME/config-    echo "store-dir:         $CABALHOME/store"                                  >> $CABALHOME/config-    echo "install-dirs user"                                                    >> $CABALHOME/config-    echo "  prefix: $CABALHOME"                                                 >> $CABALHOME/config-    echo "repository hackage.haskell.org"                                       >> $CABALHOME/config-    echo "  url: http://hackage.haskell.org/"                                   >> $CABALHOME/config-    echo "  secure: True"                                                       >> $CABALHOME/config-    echo "  key-threshold: 3"                                                   >> $CABALHOME/config-    echo "  root-keys:"                                                         >> $CABALHOME/config-    echo "    fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0" >> $CABALHOME/config-    echo "    1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42" >> $CABALHOME/config-    echo "    2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3" >> $CABALHOME/config-    echo "    0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d" >> $CABALHOME/config-    echo "    51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921" >> $CABALHOME/config-  - |-    if $HEADHACKAGE; then-    echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config-    echo "repository head.hackage.ghc.haskell.org"                                        >> $CABALHOME/config-    echo "   url: https://ghc.gitlab.haskell.org/head.hackage/"                           >> $CABALHOME/config-    echo "   secure: True"                                                                >> $CABALHOME/config-    echo "   root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d" >> $CABALHOME/config-    echo "              26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329" >> $CABALHOME/config-    echo "              f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89" >> $CABALHOME/config-    echo "   key-threshold: 3"                                                            >> $CABALHOME/config-    fi+    echo "verbose: normal +nowrap +markoutput"          >> $CABALHOME/config+    echo "remote-build-reporting: anonymous"            >> $CABALHOME/config+    echo "write-ghc-environment-files: always"          >> $CABALHOME/config+    echo "remote-repo-cache: $CABALHOME/packages"       >> $CABALHOME/config+    echo "logs-dir:          $CABALHOME/logs"           >> $CABALHOME/config+    echo "world-file:        $CABALHOME/world"          >> $CABALHOME/config+    echo "extra-prog-path:   $CABALHOME/bin"            >> $CABALHOME/config+    echo "symlink-bindir:    $CABALHOME/bin"            >> $CABALHOME/config+    echo "installdir:        $CABALHOME/bin"            >> $CABALHOME/config+    echo "build-summary:     $CABALHOME/logs/build.log" >> $CABALHOME/config+    echo "store-dir:         $CABALHOME/store"          >> $CABALHOME/config+    echo "install-dirs user"                            >> $CABALHOME/config+    echo "  prefix: $CABALHOME"                         >> $CABALHOME/config+    echo "repository hackage.haskell.org"               >> $CABALHOME/config+    echo "  url: http://hackage.haskell.org/"           >> $CABALHOME/config+install:+  - ${CABAL} --version+  - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"   - |     echo "program-default-options"                >> $CABALHOME/config     echo "  ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config@@ -159,6 +119,10 @@   - |     echo "packages: ." >> cabal.project     echo "packages: ./examples" >> cabal.project+  - if [ $HCNUMVER -ge 80200 ] ; then echo 'package free' >> cabal.project ; fi+  - "if [ $HCNUMVER -ge 80200 ] ; then echo '  ghc-options: -Werror=missing-methods' >> cabal.project ; fi"+  - if [ $HCNUMVER -ge 80200 ] ; then echo 'package free-examples' >> cabal.project ; fi+  - "if [ $HCNUMVER -ge 80200 ] ; then echo '  ghc-options: -Werror=missing-methods' >> cabal.project ; fi"   - |     echo "package free-examples"     >> cabal.project     echo "  flags: -mandelbrot-iter" >> cabal.project@@ -167,14 +131,14 @@   - cat cabal.project.local || true   - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi   - if [ -f "./examples/configure.ac" ]; then (cd "./examples" && autoreconf -i); fi-  - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output+  - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}   - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"   - rm  cabal.project.freeze-  - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output+  - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all script:   - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)   # Packaging...-  - ${CABAL} v2-sdist all | color_cabal_output+  - ${CABAL} v2-sdist all   # Unpacking...   - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/   - cd ${DISTDIR} || false@@ -188,6 +152,10 @@   - |     echo "packages: ${PKGDIR_free}" >> cabal.project     echo "packages: ${PKGDIR_free_examples}" >> cabal.project+  - if [ $HCNUMVER -ge 80200 ] ; then echo 'package free' >> cabal.project ; fi+  - "if [ $HCNUMVER -ge 80200 ] ; then echo '  ghc-options: -Werror=missing-methods' >> cabal.project ; fi"+  - if [ $HCNUMVER -ge 80200 ] ; then echo 'package free-examples' >> cabal.project ; fi+  - "if [ $HCNUMVER -ge 80200 ] ; then echo '  ghc-options: -Werror=missing-methods' >> cabal.project ; fi"   - |     echo "package free-examples"     >> cabal.project     echo "  flags: -mandelbrot-iter" >> cabal.project@@ -196,12 +164,12 @@   - cat cabal.project.local || true   # Building with tests and benchmarks...   # build & run tests, build benchmarks-  - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output+  - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all   # cabal check...   - (cd ${PKGDIR_free} && ${CABAL} -vnormal check)   - (cd ${PKGDIR_free_examples} && ${CABAL} -vnormal check)   # haddock...-  - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output+  - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all -# REGENDATA ("0.9.20191126",["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"])+# REGENDATA ("0.10",["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"]) # EOF
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+5.1.4 [2020.10.01]+------------------+* Allow building with `template-haskell-2.17.0.0` (GHC 9.0).+ 5.1.3 [2019.11.26] ------------------ * Allow building with `template-haskell-2.16` (GHC 8.10).
doc/proof/Control/Comonad/Trans/Cofree/instance-Applicative-CofreeT.md view
@@ -200,7 +200,7 @@ .               ≡ (.) ``` -By repeteadly applying the Applicative laws for the underlying functor, we+By repeatedly applying the Applicative laws for the underlying functor, we get:  ```haskell@@ -288,7 +288,7 @@ $W              ≡ ($ star(C w)) ``` -By repeteadly applying composition law for w, we get:+By repeatedly applying composition law for w, we get:  ```haskell   
doc/proof/Control/Comonad/Trans/Cofree/instance-Monad-CofreeT.md view
@@ -20,7 +20,7 @@ This definition is equivalent to that of the Cofree module if 'w' is identity.  -The tokens `CofreeT` and `runCofreeT` are abreviated as `C` and `unC`, +The tokens `CofreeT` and `runCofreeT` are abbreviated as `C` and `unC`,  respectively, for readability.  ## Left identity
examples/MandelbrotIter.lhs view
@@ -1,18 +1,15 @@-Compiling to an executable file with the @-O2@ optimization level is recomended.+Compiling to an executable file with the @-O2@ optimization level is recommended.  For example: @ghc -o 'mandelbrot_iter' -O2 MandelbrotIter.lhs ; ./mandelbrot_iter@  > {-# LANGUAGE PackageImports #-} -> import Control.Arrow+> import Control.Arrow hiding (loop) > import Control.Monad.Trans.Iter > import "mtl" Control.Monad.Reader-> import "mtl" Control.Monad.List-> import "mtl" Control.Monad.Identity-> import Control.Monad.IO.Class > import Data.Complex > import Graphics.HGL (runGraphics, Window, withPen,->                      line, RGB (RGB), RedrawMode (Unbuffered, DoubleBuffered), openWindowEx,+>                      line, RGB (RGB), RedrawMode (DoubleBuffered), openWindowEx, >                      drawInWindow, mkPen, Style (Solid))  Some fractals can be defined by infinite sequences of complex numbers. For example,@@ -20,11 +17,11 @@ the following sequence is generated for each point @c@ in the complex plane:  @-z₀ = c      +z₀ = c -z₁ = z₀² + c       +z₁ = z₀² + c -z₂ = z₁² + c        +z₂ = z₁² + c  @@@ -96,7 +93,7 @@ Drawing a point is equivalent to drawing a line of length one.  > drawPoint :: RGB -> (Int,Int) -> FractalM ()-> drawPoint color p@(x,y) = do+> drawPoint color (x,y) = do >   w <- asks window >   let point = line (x,y) (x+1, y+1) >   liftIO $ drawInWindow w $ mkPen Solid 1 color (flip withPen point)@@ -133,6 +130,6 @@ >   runGraphics $ do >     w <- openWindowEx "Mandelbrot" Nothing (windowWidth, windowHeight) DoubleBuffered (Just 1) >     let canvas = Canvas windowWidth windowHeight w->     runFractalM' 100 canvas drawMandelbrot+>     _ <- runFractalM' 100 canvas drawMandelbrot >     putStrLn $ "Fin" 
examples/free-examples.cabal view
@@ -18,7 +18,7 @@              , GHC == 8.2.2              , GHC == 8.4.4              , GHC == 8.6.5-             , GHC == 8.8.1+             , GHC == 8.8.3              , GHC == 8.10.1 synopsis:      Monads for free description:   Examples projects using @free@
free.cabal view
@@ -1,6 +1,6 @@ name:          free category:      Control, Monads-version:       5.1.3+version:       5.1.4 license:       BSD3 cabal-version: 1.18 license-file:  LICENSE@@ -18,7 +18,7 @@              , GHC == 8.2.2              , GHC == 8.4.4              , GHC == 8.6.5-             , GHC == 8.8.1+             , GHC == 8.8.3              , GHC == 8.10.1 synopsis:      Monads for free description:@@ -87,9 +87,10 @@     mtl                  >= 2.0.1.0 && < 2.3,     profunctors          >= 4 && < 6,     semigroupoids        >= 4 && < 6,+    th-abstraction       >= 0.4 && < 0.5,     transformers         >= 0.2.0   && < 0.6,     transformers-base    >= 0.4 && < 0.5,-    template-haskell     >= 2.7.0.0 && < 3,+    template-haskell     >= 2.7.0.0 && < 2.18,     exceptions           >= 0.6 && < 0.11,     containers           < 0.7 @@ -133,6 +134,9 @@    -- See https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#base-4.9.0.0   if impl(ghc >= 8.0)-    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances+    ghc-options: -Wcompat -Wnoncanonical-monad-instances++    if !impl(ghc >= 8.8)+      ghc-options: -Wnoncanonical-monadfail-instances   else     build-depends: fail == 4.9.*
src/Control/Comonad/Cofree.hs view
@@ -91,7 +91,7 @@ -- -- For instance, ----- * @'Cofree' 'Maybe'@ forms the a comonad for a non-empty list.+-- * @'Cofree' 'Maybe'@ forms the comonad for a non-empty list. -- -- * @'Cofree' ('Const' b)@ is a product. --
src/Control/Monad/Free/TH.hs view
@@ -36,7 +36,8 @@ import Control.Monad import Data.Char (toLower) import Data.List ((\\), nub)-import Language.Haskell.TH+import Language.Haskell.TH.Datatype.TyVarBndr+import Language.Haskell.TH.Ppr (pprint) import Language.Haskell.TH.Syntax  #if !(MIN_VERSION_base(4,8,0))@@ -63,10 +64,6 @@ zipExprs ps (c:cs) (Captured _ _ : as) = c : zipExprs ps cs as zipExprs _ _ _ = [] -tyVarBndrName :: TyVarBndr -> Name-tyVarBndrName (PlainTV  name)   = name-tyVarBndrName (KindedTV name _) = name- findTypeOrFail :: String -> Q Name findTypeOrFail s = lookupTypeName s >>= maybe (fail $ s ++ " is not in scope") return @@ -86,7 +83,7 @@ usesTV n (VarT name)  = n == name usesTV n (AppT t1 t2) = any (usesTV n) [t1, t2] usesTV n (SigT t  _ ) = usesTV n t-usesTV n (ForallT bs _ t) = usesTV n t && n `notElem` map tyVarBndrName bs+usesTV n (ForallT bs _ t) = usesTV n t && n `notElem` map tvName bs usesTV _ _ = False  -- | Analyze constructor argument.@@ -184,10 +181,7 @@   , unlines (map (pprint . fst) xs) ]  extractVars :: Type -> [Name]-extractVars (ForallT bs _ t) = extractVars t \\ map bndrName bs-  where-    bndrName (PlainTV n) = n-    bndrName (KindedTV n _) = n+extractVars (ForallT bs _ t) = extractVars t \\ map tvName bs extractVars (VarT n) = [n] extractVars (AppT x y) = extractVars x ++ extractVars y #if MIN_VERSION_template_haskell(2,8,0)@@ -202,7 +196,7 @@ #endif extractVars _ = [] -liftCon' :: Bool -> [TyVarBndr] -> Cxt -> Type -> Type -> [Type] -> Name -> [Type] -> Q [Dec]+liftCon' :: Bool -> [TyVarBndrSpec] -> Cxt -> Type -> Type -> [Type] -> Name -> [Type] -> Q [Dec] liftCon' typeSig tvbs cx f n ns cn ts = do   -- prepare some names   opName <- mkName <$> mkOpName (nameBase cn)@@ -225,7 +219,7 @@       exprs = zipExprs (map VarE xs) es args  -- this is what ctor would be applied to       fval = foldl AppE (ConE cn) exprs       -- this is RHS without liftF       ns' = nub (concatMap extractVars ns)-      q = filter nonNext tvbs ++ map PlainTV (qa ++ m : ns')+      q = filter nonNext tvbs ++ map plainTVSpecified (qa ++ m : ns')       qa = case retType of VarT b | a == b -> [a]; _ -> []       f' = foldl AppT f ns   return $ concat@@ -238,11 +232,10 @@         else []     , [ FunD opName [ Clause pat (NormalB $ AppE (VarE liftF) fval) [] ] ] ]   where-    nonNext (PlainTV pn) = VarT pn /= n-    nonNext (KindedTV kn _) = VarT kn /= n+    nonNext tv = VarT (tvName tv) /= n  -- | Provide free monadic actions for a single value constructor.-liftCon :: Bool -> [TyVarBndr] -> Cxt -> Type -> Type -> [Type] -> Maybe [Name] -> Con -> Q [Dec]+liftCon :: Bool -> [TyVarBndrSpec] -> Cxt -> Type -> Type -> [Type] -> Maybe [Name] -> Con -> Q [Dec] liftCon typeSig ts cx f n ns onlyCons con   | not (any (`melem` onlyCons) (constructorNames con)) = return []   | otherwise = case con of@@ -264,15 +257,21 @@       _ -> fail $ "Unsupported constructor type: `" ++ pprint con ++ "'"  #if MIN_VERSION_template_haskell(2,11,0)-splitAppT :: Type -> [Type]-splitAppT (AppT x y) = splitAppT x ++ [y]-splitAppT t = [t]+splitAppT :: Type -> (Type, [Type])+splitAppT ty = go ty ty []+  where+    go :: Type -> Type -> [Type] -> (Type, [Type])+    go _      (AppT ty1 ty2)     args = go ty1 ty1 (ty2:args)+    go origTy (SigT ty' _)       args = go origTy ty' args+    go origTy (InfixT ty1 n ty2) args = go origTy (ConT n `AppT` ty1 `AppT` ty2) args+    go origTy (ParensT ty')      args = go origTy ty' args+    go origTy _                  args = (origTy, args) -liftGadtC :: Name -> [BangType] -> Type -> Bool -> [TyVarBndr] -> Cxt -> Type -> Q [Dec]+liftGadtC :: Name -> [BangType] -> Type -> Bool -> [TyVarBndrSpec] -> Cxt -> Type -> Q [Dec] liftGadtC cName fields resType typeSig ts cx f =   liftCon typeSig ts cx f nextTy (init tys) Nothing (NormalC cName fields)   where-    (_f : tys) = splitAppT resType+    (_f, tys) = splitAppT resType     nextTy = last tys #endif @@ -305,7 +304,7 @@   | null tyVarBndrs = fail $ "Type constructor " ++ pprint tyName ++ " needs at least one type parameter"   | otherwise = concat <$> mapM (liftCon typeSig [] [] con nextTy (init tys) onlyCons) cons     where-      tys     = map (VarT . tyVarBndrName) tyVarBndrs+      tys     = map (VarT . tvName) tyVarBndrs       nextTy  = last tys       con        = ConT tyName liftDec _ _ dec = fail $ unlines