Skip to content

Law-abiding Apply NonEmptyList that agrees with Apply List #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
884f339
Update ci.yml
UnrelatedString Feb 27, 2025
aeed7b3
my toUnfoldable(1) tweak seems to compile and pass tests in the non-L…
UnrelatedString Feb 27, 2025
ae20e88
And it seems to work copy-pasted in Data.List.Lazy.NonEmpty
UnrelatedString Feb 27, 2025
9774982
Added tests for toUnfoldable (both my NonEmpty reimpls and the normal…
UnrelatedString Feb 27, 2025
e88840f
Update CHANGELOG.md
UnrelatedString Feb 27, 2025
ed16fa4
oh yeah, iterate IS in NonEmpty
UnrelatedString Feb 27, 2025
048081a
Update CHANGELOG.md
UnrelatedString Feb 27, 2025
34f77a8
Merge pull request #1 from UnrelatedString/unfoldable1
UnrelatedString Feb 27, 2025
46d0273
...aaaaaaaaaand of course local deps can't read bower. whatever at le…
UnrelatedString Apr 29, 2025
91944fa
oops
UnrelatedString Apr 29, 2025
5a2cf21
ooops
UnrelatedString Apr 29, 2025
1bc783e
so wait I can't even ... ???
UnrelatedString Apr 29, 2025
0b5f98e
nope
UnrelatedString Apr 29, 2025
aa60155
...just hope this works I guess LMAO
UnrelatedString Apr 29, 2025
0c920af
so. anything too new literally CAN'T be on Bower because the whole th…
UnrelatedString Apr 29, 2025
147deb1
...wait this might actually work. just. the same thing but with bower…
UnrelatedString Apr 29, 2025
67d5980
all that to add transitive dependencies for the one thing that doesn'…
UnrelatedString Apr 29, 2025
6857984
that line is LITERALLY NOT IN THE LOCAL COPY of course somehow the fo…
UnrelatedString Apr 29, 2025
4027829
WHATTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
UnrelatedString Apr 29, 2025
f75feca
AAHAKFHKHAHAHAHFASHFJSHFJASFH?AJSFHASDFHAWJFHASFGASHDFAJSERFHASERFL .…
UnrelatedString Apr 29, 2025
83a1ee9
...also fixing errors in the test code while I'm at it...
UnrelatedString Apr 29, 2025
d4e07c5
YESSSSS WE ARE SO BACKKKKKKKK
UnrelatedString Apr 29, 2025
964ac75
...and actually let the CI run on this branch LMAO
UnrelatedString Apr 29, 2025
bd3cacc
uhhhhhh
UnrelatedString Apr 29, 2025
1869ac5
phew......
UnrelatedString Apr 29, 2025
25a3881
Apply and Applicative :D
UnrelatedString Apr 29, 2025
5d2c90e
and there's the failure :DDDDDDDDD finallyyyyyyyy
UnrelatedString Apr 29, 2025
dad7ea2
same problem. much easier to read. also more problems oops lmao
UnrelatedString Apr 29, 2025
98992f1
no problems! just also kinda always recomputes the first element whic…
UnrelatedString Apr 29, 2025
0da9144
monad laws while I'm at it
UnrelatedString Apr 30, 2025
c9443ec
WAIT IT WAS LITERALLY JUST THAT AAAAAAAAAA
UnrelatedString Apr 30, 2025
1220624
ported fix to lazy but porting tests is a wee bit trickier
UnrelatedString Apr 30, 2025
04542ba
okay you know what I'm just not going to overdo it. better programmer…
UnrelatedString May 2, 2025
345e1db
Update CHANGELOG.md
UnrelatedString May 2, 2025
46e1604
...this test might help
UnrelatedString May 2, 2025
ccafbe8
Merge branch 'main' into fixed-apply-instance for nice new test
UnrelatedString May 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: "14.x"
node-version: "20.x"

- name: Install dependencies
run: |
npm install -g bower
npm install -g spago@next
npm install
bower install --production

Expand All @@ -32,4 +29,8 @@ jobs:
- name: Run tests
run: |
bower install
npm run-script test --if-present
npm run test

- name: Run additional tests
run: npm run testsubdir

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
/node_modules/
/output/
package-lock.json

/quickcheck/bower_components/
/quickcheck/output/
/quickcheck/.*
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ Notable changes to this project are documented in this file. The format is based

Breaking changes:

- Change `Apply NonEmptyList` instance to obey `Apply` and `Applicative` laws

New features:

- Change `NonEmpty.toUnfoldable` to produce any `Unfoldable1` (#220 by @UnrelatedString)

Bugfixes:

- Change `Apply NonEmptyList` instance to obey `Apply` and `Applicative` laws

Other improvements:

## [v7.0.0](https://github.com/purescript/purescript-lists/releases/tag/v7.0.0) - 2022-04-27
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"clean": "rimraf output && rimraf .pulp-cache",
"build": "pulp build -- --censor-lib --strict",
"test": "pulp test",
"testsubdir": "cd quickcheck; spago build && cp -r ../src .spago/p/lists-*.*.* && spago test",
"bench:build": "purs compile 'bench/**/*.purs' 'src/**/*.purs' 'bower_components/*/src/**/*.purs'",
"bench:run": "node --expose-gc -e 'require(\"./output/Bench.Main/index.js\").main()'",
"bench": "npm run bench:build && npm run bench:run"
Expand Down
Loading