Hello community,

here is the log from the commit of package ghc-base-compat for openSUSE:Factory 
checked in at 2020-10-23 15:13:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-base-compat (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-base-compat.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-base-compat"

Fri Oct 23 15:13:27 2020 rev:16 rq:842737 version:0.11.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-base-compat/ghc-base-compat.changes  
2020-08-28 21:25:42.472448924 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-base-compat.new.3463/ghc-base-compat.changes    
    2020-10-23 15:13:33.670111477 +0200
@@ -1,0 +2,9 @@
+Tue Oct  6 08:56:12 UTC 2020 - psim...@suse.com
+
+- Update base-compat to version 0.11.2.
+  ## Changes in 0.11.2 [2020.09.30]
+   - Sync with `base-4.15`/GHC 9.0
+   - Backport `singleton` to `Data.List` and `Data.List.NonEmpty`
+   - Backport `hGetContents'`, `getContents'`, and `readFile'` added to 
`System.IO`
+
+-------------------------------------------------------------------

Old:
----
  base-compat-0.11.1.tar.gz

New:
----
  base-compat-0.11.2.tar.gz

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

Other differences:
------------------
++++++ ghc-base-compat.spec ++++++
--- /var/tmp/diff_new_pack.K5RKV0/_old  2020-10-23 15:13:34.342111801 +0200
+++ /var/tmp/diff_new_pack.K5RKV0/_new  2020-10-23 15:13:34.346111803 +0200
@@ -18,7 +18,7 @@
 
 %global pkg_name base-compat
 Name:           ghc-%{pkg_name}
-Version:        0.11.1
+Version:        0.11.2
 Release:        0
 Summary:        A compatibility layer for base
 License:        MIT

++++++ base-compat-0.11.1.tar.gz -> base-compat-0.11.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/CHANGES.markdown 
new/base-compat-0.11.2/CHANGES.markdown
--- old/base-compat-0.11.1/CHANGES.markdown     2001-09-09 03:46:40.000000000 
+0200
+++ new/base-compat-0.11.2/CHANGES.markdown     2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,8 @@
+## Changes in 0.11.2 [2020.09.30]
+ - Sync with `base-4.15`/GHC 9.0
+ - Backport `singleton` to `Data.List` and `Data.List.NonEmpty`
+ - Backport `hGetContents'`, `getContents'`, and `readFile'` added to 
`System.IO`
+
 ## Changes in 0.11.1 [2020.01.27]
  - Sync with `base-4.14`/GHC 8.10
  - Backport `isResourceVanishedError`, `resourceVanishedErrorType`, and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/README.markdown 
new/base-compat-0.11.2/README.markdown
--- old/base-compat-0.11.1/README.markdown      2001-09-09 03:46:40.000000000 
+0200
+++ new/base-compat-0.11.2/README.markdown      2001-09-09 03:46:40.000000000 
+0200
@@ -152,6 +152,8 @@
  * `RuntimeRep`-polymorphic `throw` to `Control.Exception.Compat`
  * `isResourceVanishedError`, `resourceVanishedErrorType`, and
    `isResourceVanishedErrorType` to `System.IO.Error.Compat`
+ * `singleton` to `Data.List.Compat` and `Data.List.NonEmpty.Compat`
+ * `hGetContents'`, `getContents'`, and `readFile'` to `System.IO`
 
 ## What is not covered
 
@@ -304,6 +306,7 @@
 
 ## Supported versions of GHC/`base`
 
+ * `ghc-9.0.*`  / `base-4.15.*`
  * `ghc-8.10.*` / `base-4.14.*`
  * `ghc-8.8.*`  / `base-4.13.*`
  * `ghc-8.6.*`  / `base-4.12.*`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/base-compat.cabal 
new/base-compat-0.11.2/base-compat.cabal
--- old/base-compat-0.11.1/base-compat.cabal    2001-09-09 03:46:40.000000000 
+0200
+++ new/base-compat-0.11.2/base-compat.cabal    2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,5 @@
 name:             base-compat
-version:          0.11.1
+version:          0.11.2
 license:          MIT
 license-file:     LICENSE
 copyright:        (c) 2012-2018 Simon Hengel,
@@ -12,7 +12,7 @@
                   João Cristóvão <jmacristo...@gmail.com>,
                   Ryan Scott <ryan.gl.sc...@gmail.com>
 build-type:       Simple
-cabal-version:    >= 1.8
+cabal-version:    >= 1.10
 category:         Compatibility
 synopsis:         A compatibility layer for base
 description:      Provides functions available in later versions of @base@ to
@@ -53,7 +53,7 @@
                   , GHC == 8.2.2
                   , GHC == 8.4.4
                   , GHC == 8.6.5
-                  , GHC == 8.8.2
+                  , GHC == 8.8.3
                   , GHC == 8.10.1
 extra-source-files: CHANGES.markdown, README.markdown
 
@@ -65,6 +65,8 @@
 library
   ghc-options:
       -Wall
+  default-language:
+      Haskell2010
   build-depends:
       base >= 4.3 && < 5
   if !os(windows) && !os(halvm)
@@ -132,6 +134,7 @@
       Prelude.Compat
       System.Environment.Compat
       System.Exit.Compat
+      System.IO.Compat
       System.IO.Error.Compat
       System.IO.Unsafe.Compat
       Text.Read.Compat
@@ -191,6 +194,7 @@
       Prelude.Compat.Repl
       System.Environment.Compat.Repl
       System.Exit.Compat.Repl
+      System.IO.Compat.Repl
       System.IO.Error.Compat.Repl
       System.IO.Unsafe.Compat.Repl
       Text.Read.Compat.Repl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/src/Data/List/Compat.hs 
new/base-compat-0.11.2/src/Data/List/Compat.hs
--- old/base-compat-0.11.1/src/Data/List/Compat.hs      2001-09-09 
03:46:40.000000000 +0200
+++ new/base-compat-0.11.2/src/Data/List/Compat.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -5,6 +5,10 @@
 #endif
 module Data.List.Compat (
   module Base
+#if !(MIN_VERSION_base(4,15,0))
+, singleton
+#endif
+
 #if !(MIN_VERSION_base(4,11,0))
 , iterate'
 #endif
@@ -235,3 +239,15 @@
 "iterate'FB"  [1]                iterate'FB (:) = iterate'
  #-}
 #endif
+
+#if !(MIN_VERSION_base(4,15,0))
+-- | Produce singleton list.
+--
+-- >>> singleton True
+-- [True]
+--
+-- /Since: 4.14.0.0/
+--
+singleton :: a -> [a]
+singleton x = [x]
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/src/Data/List/NonEmpty/Compat.hs 
new/base-compat-0.11.2/src/Data/List/NonEmpty/Compat.hs
--- old/base-compat-0.11.1/src/Data/List/NonEmpty/Compat.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/base-compat-0.11.2/src/Data/List/NonEmpty/Compat.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -22,6 +22,7 @@
   , tail        
   , last        
   , init        
+  , singleton
   , (<|), cons  
   , uncons      
   , unfoldr     
@@ -76,3 +77,11 @@
 #if MIN_VERSION_base(4,9,0)
 import Data.List.NonEmpty
 #endif
+
+#if MIN_VERSION_base(4,9,0) && !(MIN_VERSION_base(4,15,0))
+-- | Construct a 'NonEmpty' list from a single element.
+--
+-- /Since: 4.15/
+singleton :: a -> NonEmpty a
+singleton a = a :| []
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/src/System/IO/Compat/Repl.hs 
new/base-compat-0.11.2/src/System/IO/Compat/Repl.hs
--- old/base-compat-0.11.1/src/System/IO/Compat/Repl.hs 1970-01-01 
01:00:00.000000000 +0100
+++ new/base-compat-0.11.2/src/System/IO/Compat/Repl.hs 2001-09-09 
03:46:40.000000000 +0200
@@ -0,0 +1,8 @@
+{-# LANGUAGE PackageImports #-}
+{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-}
+-- | Reexports "System.IO.Compat"
+-- from a globally unique namespace.
+module System.IO.Compat.Repl (
+  module System.IO.Compat
+) where
+import "this" System.IO.Compat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/base-compat-0.11.1/src/System/IO/Compat.hs 
new/base-compat-0.11.2/src/System/IO/Compat.hs
--- old/base-compat-0.11.1/src/System/IO/Compat.hs      1970-01-01 
01:00:00.000000000 +0100
+++ new/base-compat-0.11.2/src/System/IO/Compat.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -0,0 +1,46 @@
+{-# LANGUAGE CPP, NoImplicitPrelude #-}
+module System.IO.Compat (
+  module Base
+, getContents'
+, hGetContents'
+, readFile'
+) where
+
+import System.IO as Base
+
+#if !(MIN_VERSION_base(4,15,0))
+import Prelude.Compat
+
+-- | The 'getContents'' operation returns all user input as a single string,
+-- which is fully read before being returned
+-- (same as 'hGetContents'' 'stdin').
+--
+-- /Since: 4.15.0.0/
+
+getContents'    :: IO String
+getContents'    =  hGetContents' stdin
+
+-- | The 'readFile'' function reads a file and
+-- returns the contents of the file as a string.
+-- The file is fully read before being returned, as with 'getContents''.
+--
+-- /Since: 4.15.0.0/
+
+readFile'       :: FilePath -> IO String
+readFile' name  =  openFile name ReadMode >>= hGetContents'
+
+-- | The 'hGetContents'' operation reads all input on the given handle
+-- before returning it as a 'String' and closing the handle.
+--
+-- /Since: 4.15.0.0/
+
+hGetContents'   :: Handle -> IO String
+hGetContents' h =  hGetContents h >>= \s -> length s `seq` return s
+ -- NB: The actual implementation of hGetContents' in `base` uses a lot of
+ -- low-level code from GHC.IO.Handle.Text. What's worse, a lot of this
+ -- low-level code isn't exported, so we'd have to reimplement large chunks
+ -- of it in base-compat if we wanted to backport it. For now, I've opted for
+ -- the simpler approach of simply defining hGetContents' in terms of
+ -- hGetContents, which is the approach that the `extra` and `strict` libraries
+ -- use. (Indeed, the code above is taken from `strict`.)
+#endif


Reply via email to