Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 15 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,29 @@ on:
pull_request:
branches: [master]

permissions:
contents: read

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

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

- uses: actions/setup-node@v2
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "14.x"
node-version: "24"

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

- name: Build source
run: npm run-script build
run: npm run build

- name: Run tests
run: |
bower install
npm run-script test --if-present
run: npm test

- name: Run benchmarks
run: npm run bench

- name: Check formatting
run: npm run format:check
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/.*
!/.gitignore
!/.github/
!/.tidyrc.json
/bower_components/
/node_modules/
/output/
package-lock.json
/package-lock.json
/spago.lock
10 changes: 10 additions & 0 deletions .tidyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"importSort": "ide",
"importWrap": "source",
"indent": 2,
"operatorsFile": null,
"ribbon": 1,
"typeArrowPlacement": "first",
"unicode": "never",
"width": null
}
33 changes: 16 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ Bugfixes:

Other improvements:

## [v7.0.1](https://github.com/purescript/purescript-lists/releases/tag/v7.0.1) - 2026-10-17

Other improvements:

- Migrate from Bower/Pulp to Spago and update CI (#223 by @thomashoneyman).
- Explicitly use `join` for `concat` (#212).

## [v7.0.0](https://github.com/purescript/purescript-lists/releases/tag/v7.0.0) - 2022-04-27

Breaking changes:

- Update project and deps to PureScript v0.15.0 (#203 by @JordanMartinez)
- Drop deprecated `MonadZero` instance (#205 by @JordanMartinez)
- Drop deprecated `group'` and `mapWithIndex` (#206 by @JordanMartinez)
Expand All @@ -31,40 +39,46 @@ Other improvements:
Breaking changes:

New features:

- Added `cons` for `Lazy.NonEmptyList` (#143 by @matthewleon)

Bugfixes:

Other improvements:

- Fix ad-hoc usage of case expression (#202 by @JordanMartinez)

## [v6.0.1](https://github.com/purescript/purescript-lists/releases/tag/v6.0.1) - 2021-04-19

Other improvements:

- Fixed warnings revealed by v0.14.1 PS release (#198 by @JordanMartinez)

## [v6.0.0](https://github.com/purescript/purescript-lists/releases/tag/v6.0.0) - 2021-02-26

Breaking changes:

- Converted `nub`/`nubBy` to use ordering, rather than equality (#179)
- Renamed `scanrLazy` to `scanlLazy` and fixed parameter ordering (#161)
- Renamed `group'` to `groupAll` (#182)
- Changed `Alt ZipList` to satisfy distributivity (#150)
- Updated the `Show` instances for (non empty) lazy lists (#181)

New features:

- Added `nubEq`/`nubByEq` (#179)
- Added `groupAllBy` (#182)
- Added `Eq1` and `Ord1` instances to `NonEmptyList` and `LazyNonEmptyList` (#188)

Bugfixes:

Other improvements:

- Fixed Lazy List docs where original list is returned instead of Nothing (#169)
- Migrated to GitHub Actions (#177)
- Changed `foldM` type signature to more closely match `foldl` (#165)
- Improved `foldr` performance on large lists (#180)
- Generated changelog and add PR template (#187)
- Generated changelog and add PR template (#187)

## [v5.4.1](https://github.com/purescript/purescript-lists/releases/tag/v5.4.1) - 2019-05-06

Expand Down Expand Up @@ -308,6 +322,7 @@ Make `Apply` and `Bind` instances for `ListT` consistent. (@puffnfresh)
## [v0.6.0](https://github.com/purescript/purescript-lists/releases/tag/v0.6.0) - 2015-02-21

**This release requires PureScript v0.6.8 or later**

- Updated dependencies

## [v0.5.0](https://github.com/purescript/purescript-lists/releases/tag/v0.5.0) - 2015-01-10
Expand All @@ -320,44 +335,28 @@ Remove `scanl`, bump `foldable` dependency.

## [v0.3.9](https://github.com/purescript/purescript-lists/releases/tag/v0.3.9) - 2014-12-13



## [v0.3.8](https://github.com/purescript/purescript-lists/releases/tag/v0.3.8) - 2014-12-09

Bump `unfoldable` dependency.

## [v0.3.7](https://github.com/purescript/purescript-lists/releases/tag/v0.3.7) - 2014-11-26



## [v0.3.5](https://github.com/purescript/purescript-lists/releases/tag/v0.3.5) - 2014-11-18

Fixes for compiler version 0.6.1

## [v0.3.4](https://github.com/purescript/purescript-lists/releases/tag/v0.3.4) - 2014-11-14



## [v0.3.3](https://github.com/purescript/purescript-lists/releases/tag/v0.3.3) - 2014-11-08



## [v0.3.2](https://github.com/purescript/purescript-lists/releases/tag/v0.3.2) - 2014-10-29



## [v0.3.1](https://github.com/purescript/purescript-lists/releases/tag/v0.3.1) - 2014-10-06



## [v0.3.0](https://github.com/purescript/purescript-lists/releases/tag/v0.3.0) - 2014-10-01

- `ListT` by @jdegoes

## [v0.2.0](https://github.com/purescript/purescript-lists/releases/tag/v0.2.0) - 2014-08-13



## [v0.0.1](https://github.com/purescript/purescript-lists/releases/tag/v0.0.1) - 2014-07-07


11 changes: 5 additions & 6 deletions LICENSE-GHC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither name of the University nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
Expand All @@ -29,4 +29,3 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

14 changes: 14 additions & 0 deletions bench/spago.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package:
name: lists-bench
build:
strict: true
pedanticPackages: true
dependencies:
- console: ">=6.0.0 <7.0.0"
- effect: ">=4.0.0 <5.0.0"
- foldable-traversable: ">=6.0.0 <7.0.0"
- integers: ">=6.0.0 <7.0.0"
- lists: "*"
- maybe: ">=6.0.0 <7.0.0"
- minibench: ">=4.0.0 <5.0.0"
- prelude: ">=6.0.0 <7.0.0"
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module Bench.Data.List where

import Prelude

import Data.Foldable (maximum)
import Data.Int (pow)
import Data.List (List(..), take, range, foldr, length)
import Data.List (List(..), foldr, length, range, take)
import Data.Maybe (fromMaybe)
import Data.Traversable (traverse_)
import Effect (Effect)
Expand Down
4 changes: 2 additions & 2 deletions bench/Main.purs → bench/src/Main.purs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module Bench.Main where

import Prelude
import Effect (Effect)
import Effect.Console (log)

import Bench.Data.List (benchList)
import Effect (Effect)
import Effect.Console (log)

main :: Effect Unit
main = do
Expand Down
41 changes: 0 additions & 41 deletions bower.json

This file was deleted.

20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "pulp build -- --censor-lib --strict",
"test": "pulp 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"
"build": "spago build",
"test": "spago test -p lists",
"bench:build": "spago build -p lists-bench",
"bench:run": "node --expose-gc --input-type=module -e 'import { main } from \"./output/Bench.Main/index.js\"; main()'",
"bench": "npm run bench:build && npm run bench:run",
"format": "purs-tidy format-in-place src test bench/src && oxfmt --write .",
"format:check": "purs-tidy check src test bench/src && oxfmt --check ."
},
"devDependencies": {
"pulp": "16.0.0-0",
"purescript-psa": "^0.8.2",
"rimraf": "^3.0.2"
"oxfmt": "^0.73.0",
"purescript": "^0.15.16",
"purs-tidy": "^0.11.1",
"spago": "^1.0.5"
}
}
35 changes: 35 additions & 0 deletions spago.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package:
name: lists
description: Strict and lazy linked lists with helper functions and type class instances
build:
strict: true
pedanticPackages: true
publish:
version: 7.0.1
license: BSD-3-Clause
location:
githubOwner: purescript
githubRepo: purescript-lists
dependencies:
- bifunctors: ">=6.0.0 <7.0.0"
- control: ">=6.0.0 <7.0.0"
- foldable-traversable: ">=6.0.0 <7.0.0"
- lazy: ">=6.0.0 <7.0.0"
- maybe: ">=6.0.0 <7.0.0"
- newtype: ">=5.0.0 <6.0.0"
- nonempty: ">=7.0.0 <8.0.0"
- partial: ">=4.0.0 <5.0.0"
- prelude: ">=6.0.0 <7.0.0"
- tailrec: ">=6.0.0 <7.0.0"
- tuples: ">=7.0.0 <8.0.0"
- unfoldable: ">=6.0.0 <7.0.0"
test:
main: Test.Main
strict: true
pedanticPackages: true
dependencies:
- arrays: ">=7.0.0 <8.0.0"
- assert: ">=6.0.0 <7.0.0"
- console: ">=6.0.0 <7.0.0"
- effect: ">=4.0.0 <5.0.0"
workspace: {}
Loading
Loading