[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Nov 6 23:44:13 UTC 2024
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
39e13db8 by Mike Pilgrem at 2024-11-06T18:43:56-05:00
Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial
See https://github.com/haskell/core-libraries-committee/issues/293
`List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it.
The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`.
- - - - -
311e846b by Zubin Duggal at 2024-11-06T18:43:56-05:00
release: copy zip files into the correct directory
Fixes #25446
- - - - -
32e8469e by Zubin Duggal at 2024-11-06T18:43:56-05:00
release: Sign .gz bindists too
Fixes #25447
- - - - -
954a56d0 by Hécate Kleidukos at 2024-11-06T18:44:02-05:00
hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi
GHC 9.6 no good when it comes to multi-repl stuff, despite being well
within the range of n-2 releases for bootstrapping, when the script was
adapted to load haddock, in !12851
- - - - -
5 changed files:
- .gitlab/rel_eng/recompress-all
- .gitlab/rel_eng/upload.sh
- hadrian/ghci-multi-cabal.in
- libraries/base/changelog.md
- libraries/base/src/Data/List/NonEmpty.hs
Changes:
=====================================
.gitlab/rel_eng/recompress-all
=====================================
@@ -24,7 +24,7 @@ usage :
tmp="$$(mktemp -d tmp.XXX)" && \
tar -C "$$tmp" -xf $< && \
cd "$$tmp" && \
- zip -9 -r $@ * && \
+ zip -9 -r ../$@ * && \
cd .. && \
rm -R "$$tmp"
=====================================
.gitlab/rel_eng/upload.sh
=====================================
@@ -78,6 +78,7 @@ function hash_files() {
echo $(find -maxdepth 1 \
-iname '*.xz' \
-o -iname '*.lz' \
+ -o -iname '*.gz' \
-o -iname '*.bz2' \
-o -iname '*.zip' \
)
=====================================
hadrian/ghci-multi-cabal.in
=====================================
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
RUN_GHC=@WithGhc@
-if [[ $(printf "9.4.0\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi
+if [[ $(printf "9.8.1\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.8.1" ]]; then echo "Multi-repl needs at least GHC-9.8.1"; exit 1; fi
# This file is generated by configure from ghci-multi.in
=====================================
libraries/base/changelog.md
=====================================
@@ -4,6 +4,7 @@
* Restrict `Data.List.NonEmpty.unzip` to `NonEmpty (a, b) -> (NonEmpty a, NonEmpty b)`. ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86))
* Modify the implementation of `Control.Exception.throw` to avoid call-sites being inferred as diverging via precise exception.
([GHC #25066](https://gitlab.haskell.org/ghc/ghc/-/issues/25066), [CLC proposal #290](https://github.com/haskell/core-libraries-committee/issues/290))
+ * `Data.List.NonEmpty.{init,last,tails1}` are now defined using only total functions (rather than partial ones). ([CLC proposal #293](https://github.com/haskell/core-libraries-committee/issues/293))
## 4.21.0.0 *TBA*
* `GHC.Desugar` has been deprecated and should be removed in GHC 9.14. ([CLC proposal #216](https://github.com/haskell/core-libraries-committee/issues/216))
=====================================
libraries/base/src/Data/List/NonEmpty.hs
=====================================
@@ -206,11 +206,13 @@ tail (_ :| as) = as
-- | Extract the last element of the stream.
last :: NonEmpty a -> a
-last ~(a :| as) = List.last (a : as)
+last (a :| []) = a
+last (_ :| (a : as)) = last (a :| as)
-- | Extract everything except the last element of the stream.
init :: NonEmpty a -> [a]
-init ~(a :| as) = List.init (a : as)
+init (_ :| []) = []
+init (a1 :| (a2 : as)) = a1 : init (a2 :| as)
-- | Construct a 'NonEmpty' list from a single element.
--
@@ -324,7 +326,7 @@ tails = fromList . List.tails . Foldable.toList
--
-- @since 4.18
tails1 :: NonEmpty a -> NonEmpty (NonEmpty a)
-tails1 = fromList . List.tails1 . Foldable.toList
+tails1 xs = xs :| List.tails1 (tail xs)
-- | @'insert' x xs@ inserts @x@ into the last position in @xs@ where it
-- is still less than or equal to the next element. In particular, if the
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2bc736dc0f8ba235ea8ce5ec148b8a73bed3d394...954a56d0358f69d02a968861c77594d0ffb0d9df
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2bc736dc0f8ba235ea8ce5ec148b8a73bed3d394...954a56d0358f69d02a968861c77594d0ffb0d9df
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241106/d3be2b83/attachment-0001.html>
More information about the ghc-commits
mailing list