[commit: ghc] ghc-7.10: Add `GHC.OldList` legacy module (11441db)

git at git.haskell.org git at git.haskell.org
Sat Mar 7 22:37:32 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/11441db9a00223a7e96678f3d621ac14fda634f8/ghc

>---------------------------------------------------------------

commit 11441db9a00223a7e96678f3d621ac14fda634f8
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Mar 7 23:31:27 2015 +0100

    Add `GHC.OldList` legacy module
    
    This module provides access the list-specialised versions for legacy purposes
    (such as implementing Haskell2010-ish preludes). This module basically
    re-exports the hidden `Data.OldList` module (but in the less controversial `GHC.*`
    namespace, which signals less committment to keep this module around).
    
    This is legacy module is mostly for GHC 7.10's sake. What becomes long-term
    of `GHC.OldList` can be decided unhurriedly during the GHC 7.12 development
    cycle.
    
    (cherry picked from commit e76f86646229b3f8bcdc6ad71d464104c639f431)


>---------------------------------------------------------------

11441db9a00223a7e96678f3d621ac14fda634f8
 libraries/base/GHC/OldList.hs | 29 +++++++++++++++++++++++++++++
 libraries/base/base.cabal     |  1 +
 libraries/base/changelog.md   |  4 ++++
 3 files changed, 34 insertions(+)

diff --git a/libraries/base/GHC/OldList.hs b/libraries/base/GHC/OldList.hs
new file mode 100644
index 0000000..cfb7314
--- /dev/null
+++ b/libraries/base/GHC/OldList.hs
@@ -0,0 +1,29 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE Safe #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  GHC.OldList
+-- Copyright   :  (c) The University of Glasgow 2001
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
+--
+-- Maintainer  :  libraries at haskell.org
+-- Stability   :  experimental
+-- Portability :  portable
+--
+-- This legacy module provides access to the list-specialised operations
+-- of "Data.List". This module may go away again in future GHC versions and
+-- is provided as transitional tool to access some of the list-specialised
+-- operations that had to be generalised due to the implementation of the
+-- <https://wiki.haskell.org/Foldable_Traversable_In_Prelude Foldable/Traversable-in-Prelude Proposal (FTP)>.
+--
+-- If the operations needed are available in "GHC.List", it's
+-- recommended to avoid importing this module and use "GHC.List"
+-- instead for now.
+--
+-- @since 4.8.0.0
+-----------------------------------------------------------------------------
+
+module GHC.OldList (module Data.OldList) where
+
+import Data.OldList
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index c5c4a15..f83b441 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -247,6 +247,7 @@ Library
         GHC.MVar
         GHC.Natural
         GHC.Num
+        GHC.OldList
         GHC.PArr
         GHC.Pack
         GHC.Profiling
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 670fa11..e99c1b1 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -60,6 +60,10 @@
     and `Data.Foldable`/`Data.Traversable` no longer lead to conflicting
     definitions. (#9586)
 
+  * New (unofficial) module `GHC.OldList` containing only list-specialised
+    versions of the functions from `Data.List` (in other words, `GHC.OldList`
+    corresponds to `base-4.7.0.2`'s `Data.List`)
+
   * Replace the `Control.Monad`-exported functions
 
     ```



More information about the ghc-commits mailing list