summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-21 17:06:51 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-21 17:06:51 +0100
commit7ffe6d10d37381d81c224318d9e9d757829cd2e4 (patch)
tree8b986139060416eab0e6ed4ba6a2c9ddcc5390c4
parentff657a81ae5ebd4ea4628ca8ebc88dce3ecbe0ef (diff)
downloadhaskell-wip/export-list.tar.gz
Export 'type List = []' from Data.Listwip/export-list
This is a part of accepted proposal https://github.com/ghc-proposals/ghc-proposals/pull/281
-rw-r--r--libraries/base/Data/List.hs5
-rw-r--r--libraries/base/changelog.md2
2 files changed, 6 insertions, 1 deletions
diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs
index 4474e51268..6f55808394 100644
--- a/libraries/base/Data/List.hs
+++ b/libraries/base/Data/List.hs
@@ -18,8 +18,9 @@
module Data.List
(
-- * Basic functions
+ List
- (++)
+ , (++)
, head
, last
, tail
@@ -221,6 +222,8 @@ import Data.OldList hiding ( all, and, any, concat, concatMap, elem, find,
import GHC.Base ( Bool(..), Eq((==)), otherwise )
+type List = []
+
-- | The 'isSubsequenceOf' function takes two lists and returns 'True' if all
-- the elements of the first list occur, in order, in the second. The
-- elements do not have to occur consecutively.
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 0a9915feff..12c24e5750 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -39,6 +39,8 @@
`Ptr ()` to `CUIntPtr`. For typical glibc based platforms, the
affected type is `CTimer`.
+ * `Data.List` now defines `type List = []`.
+
## 4.16.0.0 *Nov 2021*
* The unary tuple type, `Solo`, is now exported by `Data.Tuple`.