packages feed

prelude-extras 0.4 → 0.4.0.1

raw patch · 4 files changed

+291/−7 lines, 4 filesnew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Prelude.Extras: instance (Eq1 f, Eq a) => Eq (Lift1 f a)
- Prelude.Extras: instance (Eq2 f, Eq a) => Eq1 (Lift2 f a)
- Prelude.Extras: instance (Eq2 f, Eq a, Eq b) => Eq (Lift2 f a b)
- Prelude.Extras: instance (Ord1 f, Ord a) => Ord (Lift1 f a)
- Prelude.Extras: instance (Ord2 f, Ord a) => Ord1 (Lift2 f a)
- Prelude.Extras: instance (Ord2 f, Ord a, Ord b) => Ord (Lift2 f a b)
- Prelude.Extras: instance (Read1 f, Read a) => Read (Lift1 f a)
- Prelude.Extras: instance (Read2 f, Read a) => Read1 (Lift2 f a)
- Prelude.Extras: instance (Read2 f, Read a, Read b) => Read (Lift2 f a b)
- Prelude.Extras: instance (Show1 f, Show a) => Show (Lift1 f a)
- Prelude.Extras: instance (Show2 f, Show a) => Show1 (Lift2 f a)
- Prelude.Extras: instance (Show2 f, Show a, Show b) => Show (Lift2 f a b)
- Prelude.Extras: instance Eq a => Eq1 (Either a)
- Prelude.Extras: instance Eq1 Maybe
- Prelude.Extras: instance Eq1 []
- Prelude.Extras: instance Eq1 f => Eq1 (Lift1 f)
- Prelude.Extras: instance Eq2 Either
- Prelude.Extras: instance Eq2 f => Eq2 (Lift2 f)
- Prelude.Extras: instance Foldable (f a) => Foldable (Lift2 f a)
- Prelude.Extras: instance Foldable f => Foldable (Lift1 f)
- Prelude.Extras: instance Functor (f a) => Functor (Lift2 f a)
- Prelude.Extras: instance Functor f => Functor (Lift1 f)
- Prelude.Extras: instance Ord a => Ord1 (Either a)
- Prelude.Extras: instance Ord1 Maybe
- Prelude.Extras: instance Ord1 []
- Prelude.Extras: instance Ord1 f => Ord1 (Lift1 f)
- Prelude.Extras: instance Ord2 Either
- Prelude.Extras: instance Ord2 f => Ord2 (Lift2 f)
- Prelude.Extras: instance Read a => Read1 ((,) a)
- Prelude.Extras: instance Read a => Read1 (Either a)
- Prelude.Extras: instance Read1 Maybe
- Prelude.Extras: instance Read1 []
- Prelude.Extras: instance Read1 f => Read1 (Lift1 f)
- Prelude.Extras: instance Read2 (,)
- Prelude.Extras: instance Read2 Either
- Prelude.Extras: instance Read2 f => Read2 (Lift2 f)
- Prelude.Extras: instance Show a => Show1 ((,) a)
- Prelude.Extras: instance Show a => Show1 (Either a)
- Prelude.Extras: instance Show1 Maybe
- Prelude.Extras: instance Show1 []
- Prelude.Extras: instance Show1 f => Show1 (Lift1 f)
- Prelude.Extras: instance Show2 (,)
- Prelude.Extras: instance Show2 Either
- Prelude.Extras: instance Show2 f => Show2 (Lift2 f)
- Prelude.Extras: instance Traversable (f a) => Traversable (Lift2 f a)
- Prelude.Extras: instance Traversable f => Traversable (Lift1 f)
- Prelude.Extras: lower1 :: Lift1 f a -> f a
- Prelude.Extras: lower2 :: Lift2 f a b -> f a b
+ Prelude.Extras: [lower1] :: Lift1 f a -> f a
+ Prelude.Extras: [lower2] :: Lift2 f a b -> f a b
+ Prelude.Extras: infixr 4 >##
+ Prelude.Extras: instance (Prelude.Extras.Eq1 f, GHC.Classes.Eq a) => GHC.Classes.Eq (Prelude.Extras.Lift1 f a)
+ Prelude.Extras: instance (Prelude.Extras.Eq2 f, GHC.Classes.Eq a) => Prelude.Extras.Eq1 (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance (Prelude.Extras.Eq2 f, GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (Prelude.Extras.Lift2 f a b)
+ Prelude.Extras: instance (Prelude.Extras.Ord1 f, GHC.Classes.Ord a) => GHC.Classes.Ord (Prelude.Extras.Lift1 f a)
+ Prelude.Extras: instance (Prelude.Extras.Ord2 f, GHC.Classes.Ord a) => Prelude.Extras.Ord1 (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance (Prelude.Extras.Ord2 f, GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (Prelude.Extras.Lift2 f a b)
+ Prelude.Extras: instance (Prelude.Extras.Read1 f, GHC.Read.Read a) => GHC.Read.Read (Prelude.Extras.Lift1 f a)
+ Prelude.Extras: instance (Prelude.Extras.Read2 f, GHC.Read.Read a) => Prelude.Extras.Read1 (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance (Prelude.Extras.Read2 f, GHC.Read.Read a, GHC.Read.Read b) => GHC.Read.Read (Prelude.Extras.Lift2 f a b)
+ Prelude.Extras: instance (Prelude.Extras.Show1 f, GHC.Show.Show a) => GHC.Show.Show (Prelude.Extras.Lift1 f a)
+ Prelude.Extras: instance (Prelude.Extras.Show2 f, GHC.Show.Show a) => Prelude.Extras.Show1 (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance (Prelude.Extras.Show2 f, GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Prelude.Extras.Lift2 f a b)
+ Prelude.Extras: instance Data.Foldable.Foldable (f a) => Data.Foldable.Foldable (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance Data.Traversable.Traversable (f a) => Data.Traversable.Traversable (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance GHC.Base.Functor (f a) => GHC.Base.Functor (Prelude.Extras.Lift2 f a)
+ Prelude.Extras: instance GHC.Base.Functor f => GHC.Base.Functor (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance GHC.Classes.Eq a => Prelude.Extras.Eq1 (Data.Either.Either a)
+ Prelude.Extras: instance GHC.Classes.Ord a => Prelude.Extras.Ord1 (Data.Either.Either a)
+ Prelude.Extras: instance GHC.Read.Read a => Prelude.Extras.Read1 ((,) a)
+ Prelude.Extras: instance GHC.Read.Read a => Prelude.Extras.Read1 (Data.Either.Either a)
+ Prelude.Extras: instance GHC.Show.Show a => Prelude.Extras.Show1 ((,) a)
+ Prelude.Extras: instance GHC.Show.Show a => Prelude.Extras.Show1 (Data.Either.Either a)
+ Prelude.Extras: instance Prelude.Extras.Eq1 Control.Applicative.ZipList
+ Prelude.Extras: instance Prelude.Extras.Eq1 Control.Concurrent.Chan.Chan
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Complex.Complex
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Fixed.Fixed
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Functor.Identity.Identity
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Monoid.Dual
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Monoid.First
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Monoid.Last
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Monoid.Product
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Monoid.Sum
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Ord.Down
+ Prelude.Extras: instance Prelude.Extras.Eq1 Data.Proxy.Proxy
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.Base.Maybe
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.Conc.Sync.TVar
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.ForeignPtr.ForeignPtr
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.IORef.IORef
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.MVar.MVar
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.Ptr.FunPtr
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.Ptr.Ptr
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.Real.Ratio
+ Prelude.Extras: instance Prelude.Extras.Eq1 GHC.Stable.StablePtr
+ Prelude.Extras: instance Prelude.Extras.Eq1 []
+ Prelude.Extras: instance Prelude.Extras.Eq1 f => Prelude.Extras.Eq1 (Data.Monoid.Alt f)
+ Prelude.Extras: instance Prelude.Extras.Eq1 f => Prelude.Extras.Eq1 (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance Prelude.Extras.Eq2 Data.Either.Either
+ Prelude.Extras: instance Prelude.Extras.Eq2 f => Prelude.Extras.Eq2 (Prelude.Extras.Lift2 f)
+ Prelude.Extras: instance Prelude.Extras.Ord1 Control.Applicative.ZipList
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Fixed.Fixed
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Functor.Identity.Identity
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Monoid.Dual
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Monoid.First
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Monoid.Last
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Monoid.Product
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Monoid.Sum
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Ord.Down
+ Prelude.Extras: instance Prelude.Extras.Ord1 Data.Proxy.Proxy
+ Prelude.Extras: instance Prelude.Extras.Ord1 GHC.Base.Maybe
+ Prelude.Extras: instance Prelude.Extras.Ord1 GHC.ForeignPtr.ForeignPtr
+ Prelude.Extras: instance Prelude.Extras.Ord1 GHC.Ptr.FunPtr
+ Prelude.Extras: instance Prelude.Extras.Ord1 GHC.Ptr.Ptr
+ Prelude.Extras: instance Prelude.Extras.Ord1 []
+ Prelude.Extras: instance Prelude.Extras.Ord1 f => Prelude.Extras.Ord1 (Data.Monoid.Alt f)
+ Prelude.Extras: instance Prelude.Extras.Ord1 f => Prelude.Extras.Ord1 (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance Prelude.Extras.Ord2 Data.Either.Either
+ Prelude.Extras: instance Prelude.Extras.Ord2 f => Prelude.Extras.Ord2 (Prelude.Extras.Lift2 f)
+ Prelude.Extras: instance Prelude.Extras.Read1 Control.Applicative.ZipList
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Complex.Complex
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Functor.Identity.Identity
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Monoid.Dual
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Monoid.First
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Monoid.Last
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Monoid.Product
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Monoid.Sum
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Ord.Down
+ Prelude.Extras: instance Prelude.Extras.Read1 Data.Proxy.Proxy
+ Prelude.Extras: instance Prelude.Extras.Read1 GHC.Base.Maybe
+ Prelude.Extras: instance Prelude.Extras.Read1 []
+ Prelude.Extras: instance Prelude.Extras.Read1 f => Prelude.Extras.Read1 (Data.Monoid.Alt f)
+ Prelude.Extras: instance Prelude.Extras.Read1 f => Prelude.Extras.Read1 (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance Prelude.Extras.Read2 (,)
+ Prelude.Extras: instance Prelude.Extras.Read2 Data.Either.Either
+ Prelude.Extras: instance Prelude.Extras.Read2 f => Prelude.Extras.Read2 (Prelude.Extras.Lift2 f)
+ Prelude.Extras: instance Prelude.Extras.Show1 Control.Applicative.ZipList
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Complex.Complex
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Functor.Identity.Identity
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Monoid.Dual
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Monoid.First
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Monoid.Last
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Monoid.Product
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Monoid.Sum
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Ord.Down
+ Prelude.Extras: instance Prelude.Extras.Show1 Data.Proxy.Proxy
+ Prelude.Extras: instance Prelude.Extras.Show1 GHC.Base.Maybe
+ Prelude.Extras: instance Prelude.Extras.Show1 GHC.ForeignPtr.ForeignPtr
+ Prelude.Extras: instance Prelude.Extras.Show1 GHC.Ptr.FunPtr
+ Prelude.Extras: instance Prelude.Extras.Show1 GHC.Ptr.Ptr
+ Prelude.Extras: instance Prelude.Extras.Show1 []
+ Prelude.Extras: instance Prelude.Extras.Show1 f => Prelude.Extras.Show1 (Data.Monoid.Alt f)
+ Prelude.Extras: instance Prelude.Extras.Show1 f => Prelude.Extras.Show1 (Prelude.Extras.Lift1 f)
+ Prelude.Extras: instance Prelude.Extras.Show2 (,)
+ Prelude.Extras: instance Prelude.Extras.Show2 Data.Either.Either
+ Prelude.Extras: instance Prelude.Extras.Show2 f => Prelude.Extras.Show2 (Prelude.Extras.Lift2 f)
- Prelude.Extras: class Eq1 f where ==# = (==)
+ Prelude.Extras: class Eq1 f
- Prelude.Extras: class Eq2 f where ==## = (==)
+ Prelude.Extras: class Eq2 f
- Prelude.Extras: class Eq1 f => Ord1 f where compare1 = compare
+ Prelude.Extras: class Eq1 f => Ord1 f
- Prelude.Extras: class Eq2 f => Ord2 f where compare2 = compare
+ Prelude.Extras: class Eq2 f => Ord2 f
- Prelude.Extras: class Read1 f where readsPrec1 = readsPrec readList1 = readPrec_to_S (list readPrec1) 0
+ Prelude.Extras: class Read1 f
- Prelude.Extras: class Read2 f where readsPrec2 = readsPrec readList2 = readPrec_to_S (list readPrec2) 0
+ Prelude.Extras: class Read2 f
- Prelude.Extras: class Show1 f where showsPrec1 = showsPrec showList1 ls s = showList__ shows1 ls s
+ Prelude.Extras: class Show1 f
- Prelude.Extras: class Show2 f where showsPrec2 = showsPrec showList2 ls s = showList__ shows2 ls s
+ Prelude.Extras: class Show2 f

Files

.travis.yml view
@@ -1,4 +1,90 @@-language: haskell+# This file has been generated -- see https://github.com/hvr/multi-ghc-travis+language: c+sudo: false++cache:+  directories:+    - $HOME/.cabsnap+    - $HOME/.cabal/packages++before_cache:+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar++matrix:+  include:+    - env: CABALVER=1.16 GHCVER=7.0.4+      compiler: ": #GHC 7.0.4"+      addons: {apt: {packages: [cabal-install-1.16,ghc-7.0.4], sources: [hvr-ghc]}}+    - env: CABALVER=1.16 GHCVER=7.4.2+      compiler: ": #GHC 7.4.2"+      addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}+    - env: CABALVER=1.16 GHCVER=7.6.3+      compiler: ": #GHC 7.6.3"+      addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}+    - env: CABALVER=1.18 GHCVER=7.8.4+      compiler: ": #GHC 7.8.4"+      addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}+    - env: CABALVER=1.22 GHCVER=7.10.2+      compiler: ": #GHC 7.10.2"+      addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}++before_install:+ - unset CC+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH++install:+ - cabal --version+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"+ - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];+   then+     zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >+          $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;+   fi+ - travis_retry cabal update -v+ - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config+ - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt+ - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt++# check whether current requested install-plan matches cached package-db snapshot+ - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;+   then+     echo "cabal build-cache HIT";+     rm -rfv .ghc;+     cp -a $HOME/.cabsnap/ghc $HOME/.ghc;+     cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;+   else+     echo "cabal build-cache MISS";+     rm -rf $HOME/.cabsnap;+     mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;+     cabal install --only-dependencies --enable-tests --enable-benchmarks;+   fi+ +# snapshot package-db on cache miss+ - if [ ! -d $HOME/.cabsnap ];+   then+      echo "snapshotting package-db to build-cache";+      mkdir $HOME/.cabsnap;+      cp -a $HOME/.ghc $HOME/.cabsnap/ghc;+      cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;+   fi++# Here starts the actual work to be performed for the package under test;+# any command which exits with a non-zero exit code causes the build to fail.+script:+ - if [ -f configure.ac ]; then autoreconf -i; fi+ - cabal configure --enable-tests --enable-benchmarks -v2  # -v2 provides useful information for debugging+ - cabal build   # this builds all libraries and executables (including tests/benchmarks)+ - cabal test+ - cabal check+ - cabal sdist   # tests that a source-distribution can be generated++# Check that the resulting source distribution can be built & installed.+# If there are no other `.tar.gz` files in `dist`, this can be even simpler:+# `cabal install --force-reinstalls dist/*-*.tar.gz`+ - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&+   (cd dist && cabal install --force-reinstalls "$SRC_TGZ")+ notifications:   irc:     channels:
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.4.0.1+-------+* Added instances for the types in base where possible+ 0.4 --- * Derived `Functor`, `Foldable`, and `Traversable` for `Lift1` and `Lift2`
prelude-extras.cabal view
@@ -1,8 +1,8 @@ name:          prelude-extras category:      Polymorphism, Combinators-version:       0.4+version:       0.4.0.1 license:       BSD3-cabal-version: >= 1.2+cabal-version: >= 1.6 license-file:  LICENSE author:        Edward A. Kmett maintainer:    Edward A. Kmett <ekmett@gmail.com>@@ -10,9 +10,10 @@ homepage:      http://github.com/ekmett/prelude-extras bug-reports:   http://github.com/ekmett/prelude-extras/issues copyright:     Copyright (C) 2011-2014 Edward A. Kmett-synopsis:      Haskell 98 - higher order versions of Prelude classes+synopsis:      Higher order versions of Prelude classes+tested-with: GHC == 7.10.2, GHC == 7.8.4, GHC == 7.6.3, GHC == 7.4.2, GHC == 7.0.4 description:-  Haskell 98 - higher order versions of Prelude classes to ease programming with polymorphic recursion and reduce UndecidableInstances+  Higher order versions of Prelude classes to ease programming with polymorphic recursion and reduce UndecidableInstances   .   See <http://flint.cs.yale.edu/trifonov/papers/sqcc.pdf> for further discussion of the approach taken here. build-type:    Simple@@ -22,6 +23,10 @@   .travis.yml   .vim.custom   CHANGELOG.markdown++source-repository head+  type: git+  location: git://github.com/ekmett/prelude-extras  library   build-depends: base >= 4 && < 5
src/Prelude/Extras.hs view
@@ -7,6 +7,10 @@ {-# LANGUAGE DefaultSignatures #-} #endif +#ifndef MIN_VERSION_base+#define MIN_VERSION_base(x,y,z) 1+#endif+ module Prelude.Extras   (   -- * Lifted Prelude classes for kind * -> *@@ -35,13 +39,37 @@   , Lift2(..)   ) where +import Control.Applicative import Control.Arrow (first)-import Data.Foldable-import Data.Traversable+import Control.Concurrent (Chan, MVar)+import Data.Complex (Complex)+import Data.Fixed+import Data.IORef (IORef)+import Data.Monoid+import Data.Ratio (Ratio)+import Foreign.ForeignPtr (ForeignPtr)+import Foreign.Ptr (Ptr, FunPtr)+import Foreign.StablePtr (StablePtr)+import GHC.Conc (TVar) import Text.Read import qualified Text.ParserCombinators.ReadP as P import qualified Text.Read.Lex as L +#if MIN_VERSION_base(4,8,0)+import Data.Functor.Identity+#else+import Data.Foldable+import Data.Traversable+#endif++#if MIN_VERSION_base(4,7,0)+import Data.Proxy+#endif++#if MIN_VERSION_base(4,6,0)+import Data.Ord (Down(..))+#endif+ infixr 4 ==#,  /=#,  <#,  <=#,  >=#,  ># infixr 4 ==##, /=##, <##, <=##, >=##, >## @@ -66,6 +94,38 @@ instance Eq1 [] where   (==#) = (==) +#if MIN_VERSION_base(4,8,0)+instance Eq1 Identity where (==#) = (==)+instance Eq1 f => Eq1 (Alt f) where Alt x ==# Alt y = x ==# y+#endif+#if MIN_VERSION_base(4,7,0)+instance Eq1 Proxy where (==#) = (==)+instance Eq1 ZipList where (==#) = (==)+#else+instance Eq1 ZipList where ZipList xs ==# ZipList ys = xs == ys+#endif+#if MIN_VERSION_base(4,6,0)+instance Eq1 Down where (==#) = (==)+#endif+instance Eq1 Dual where (==#) = (==)+instance Eq1 Sum where (==#) = (==)+instance Eq1 Product where (==#) = (==)+instance Eq1 First where (==#) = (==)+instance Eq1 Last where (==#) = (==)+instance Eq1 Ptr where (==#) = (==)+instance Eq1 FunPtr where (==#) = (==)+instance Eq1 MVar where (==#) = (==)+instance Eq1 IORef where (==#) = (==)+instance Eq1 ForeignPtr where (==#) = (==)+instance Eq1 TVar where (==#) = (==)+instance Eq1 Fixed where (==#) = (==)+instance Eq1 StablePtr where (==#) = (==)+#if MIN_VERSION_base(4,4,0)+instance Eq1 Ratio where (==#) = (==)+instance Eq1 Complex where (==#) = (==)+instance Eq1 Chan where (==#) = (==)+#endif+ class Eq2 f where   (==##) :: (Eq a, Eq b) => f a b -> f a b -> Bool #ifdef DEFAULT_SIGNATURES@@ -105,7 +165,30 @@ instance Ord1 Maybe where compare1 = compare instance Ord a => Ord1 (Either a) where compare1 = compare instance Ord1 [] where compare1 = compare+#if MIN_VERSION_base(4,8,0)+instance Ord1 Identity where compare1 = compare+instance Ord1 f => Ord1 (Alt f) where compare1 (Alt x) (Alt y) = compare1 x y+#endif+#if MIN_VERSION_base(4,7,0)+instance Ord1 Proxy where compare1 = compare+instance Ord1 ZipList where compare1 = compare+#else+instance Ord1 ZipList where compare1 (ZipList xs) (ZipList ys) = compare xs ys+#endif+#if MIN_VERSION_base(4,6,0)+instance Ord1 Down where compare1 = compare+#endif+instance Ord1 Dual where compare1 = compare+instance Ord1 Sum where compare1 = compare+instance Ord1 Product where compare1 = compare+instance Ord1 First where compare1 = compare+instance Ord1 Last where compare1 = compare+instance Ord1 Ptr where compare1 = compare+instance Ord1 FunPtr where compare1 = compare+instance Ord1 ForeignPtr where compare1 = compare+instance Ord1 Fixed where compare1 = compare + -- needs Haskell 2011 -- instance Ord1 Complex where compare1 = compare @@ -158,6 +241,38 @@ instance Show1 [] where showsPrec1 = showsPrec instance Show a => Show1 (Either a) where showsPrec1 = showsPrec instance Show a => Show1 ((,) a) where showsPrec1 = showsPrec+#if MIN_VERSION_base(4,8,0)+instance Show1 Identity where showsPrec1 = showsPrec+#endif+#if MIN_VERSION_base(4,7,0)+instance Show1 Proxy where showsPrec1 = showsPrec+instance Show1 ZipList where showsPrec1 = showsPrec+#else+instance Show1 ZipList where+  showsPrec1 p (ZipList xs)+    = showString "ZipList {getZipList = "+    . showList xs+    . showString "}"+#endif+#if MIN_VERSION_base(4,8,0)+instance Show1 Down where showsPrec1 = showsPrec+instance Show1 f => Show1 (Alt f) where+  showsPrec1 p (Alt x)+    = showParen (p > 10)+    $ showString "Alt "+    . showsPrec1 11 x+#endif+instance Show1 Dual where showsPrec1 = showsPrec+instance Show1 Sum where showsPrec1 = showsPrec+instance Show1 Product where showsPrec1 = showsPrec+instance Show1 First where showsPrec1 = showsPrec+instance Show1 Last where showsPrec1 = showsPrec+instance Show1 Ptr where showsPrec1 = showsPrec+instance Show1 FunPtr where showsPrec1 = showsPrec+instance Show1 ForeignPtr where showsPrec1 = showsPrec+#if MIN_VERSION_base(4,4,0)+instance Show1 Complex where showsPrec1 = showsPrec+#endif  -- instance Show1 Complex @@ -246,6 +361,80 @@ instance Read a => Read1 ((,) a) where   readsPrec1 = readsPrec   readList1 = readList++#if MIN_VERSION_base(4,8,0)+instance Read1 Identity where+  readsPrec1 = readsPrec+  readList1 = readList++instance Read1 f => Read1 (Alt f) where+  readsPrec1 p+    = readParen (p > 10) $ \s ->+      do ("Alt",s1) <- lex s+         (x,s2) <- readsPrec1 11 s1+         return (Alt x, s2)++#endif++#if MIN_VERSION_base(4,7,0)+instance Read1 Proxy where+  readsPrec1 = readsPrec+  readList1 = readList+instance Read1 ZipList where+  readsPrec1 = readsPrec+  readList1 = readList+#else+instance Read1 ZipList where+  readList1 = readList1Default+  readsPrec1 _+    = readParen False $ \s ->+      do ("ZipList"   , s1) <- lex s+         ("{"         , s2) <- lex s1+         ("getZipList", s3) <- lex s2+         ("="         , s4) <- lex s3+         (xs          , s5) <- readList s4+         ("}"         , s6) <- lex s5+         return (ZipList xs, s6)+#endif++#if MIN_VERSION_base(4,7,0)+instance Read1 Down where+  readsPrec1 = readsPrec+  readList1 = readList+#elif MIN_VERSION_base(4,6,0)+instance Read1 Down where+  readList1 = readList1Default+  readsPrec1 p = readParen (p > 10) $ \s ->+    do ("Down",s1) <- lex s+       (x     ,s2) <- readsPrec 11 s1+       return (Down x, s2)+#endif++instance Read1 Dual where+  readsPrec1 = readsPrec+  readList1 = readList++instance Read1 Sum where+  readsPrec1 = readsPrec+  readList1 = readList++instance Read1 Product where+  readsPrec1 = readsPrec+  readList1 = readList++instance Read1 First where+  readsPrec1 = readsPrec+  readList1 = readList++instance Read1 Last where+  readsPrec1 = readsPrec+  readList1 = readList++#if MIN_VERSION_base(4,4,0)+instance Read1 Complex where+  readsPrec1 = readsPrec+  readList1 = readList+#endif  class Read2 f where   readsPrec2    :: (Read a, Read b) => Int -> ReadS (f a b)