From fe8f2fa11bdd448bfbfd94c9191fdd4b3b83739c Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Mon, 7 Dec 2020 19:27:17 -0800 Subject: [PATCH 1/8] Run CI on push / pull_request to master --- .github/workflows/ci.yml | 6 +++++- README.md | 1 + package.json | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2972ba..55efa3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: push +on: + push: + branches: [master] + pull_request: + branches: [master] jobs: build: diff --git a/README.md b/README.md index 5131b4f..f5164d7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Latest release](http://img.shields.io/github/release/purescript/purescript-lazy.svg)](https://github.com/purescript/purescript-lazy/releases) [![Build status](https://github.com/purescript/purescript-lazy/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-lazy/actions?query=workflow%3ACI+branch%3Amaster) +[![Pursuit](https://pursuit.purescript.org/packages/purescript-lazy/badge)](https://pursuit.purescript.org/packages/purescript-lazy) Call-by-need values. diff --git a/package.json b/package.json index 9452364..1c67b54 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "build": "eslint src && pulp build -- --censor-lib --strict" }, "devDependencies": { - "eslint": "^4.19.1", + "eslint": "^7.15.0", "pulp": "^15.0.0", "purescript-psa": "^0.8.0", - "rimraf": "^2.6.2" + "rimraf": "^3.0.2" } } From 2e15e79d01fc6824b9dace08cdce8aa6ac02e788 Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Mon, 28 Dec 2020 18:52:16 -0800 Subject: [PATCH 2/8] Fix Foldable1 instance; update CI to v0.14.0-rc5 (#32) * Remove fold1 member from Foldable1 instance * Update CI to v0.14.0-rc5 * Remove non-existent `fold1Default` from being imported --- .github/workflows/ci.yml | 2 +- src/Data/Lazy.purs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55efa3d..f4f44e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: purescript-contrib/setup-purescript@main with: - purescript: "0.14.0-rc3" + purescript: "0.14.0-rc5" - uses: actions/setup-node@v1 with: diff --git a/src/Data/Lazy.purs b/src/Data/Lazy.purs index 091c04c..9fe6117 100644 --- a/src/Data/Lazy.purs +++ b/src/Data/Lazy.purs @@ -12,7 +12,7 @@ import Data.Functor.Invariant (class Invariant, imapF) import Data.FunctorWithIndex (class FunctorWithIndex) import Data.HeytingAlgebra (implies, ff, tt) import Data.Ord (class Ord1) -import Data.Semigroup.Foldable (class Foldable1, fold1Default) +import Data.Semigroup.Foldable (class Foldable1) import Data.Semigroup.Traversable (class Traversable1) import Data.Traversable (class Traversable, traverse) import Data.TraversableWithIndex (class TraversableWithIndex) @@ -101,7 +101,6 @@ instance foldableWithIndexLazy :: FoldableWithIndex Unit Lazy where instance foldable1Lazy :: Foldable1 Lazy where foldMap1 f l = f (force l) - fold1 = fold1Default foldr1 _ l = force l foldl1 _ l = force l From c2eb191d713a41539340ad88c0db9a7c0f381139 Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Sun, 10 Jan 2021 14:53:29 -0800 Subject: [PATCH 3/8] Generate changelog and add PR template (#33) * Generate CHANGELOG.md file using notes from previous GH releases * Add pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 12 +++++ CHANGELOG.md | 79 ++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CHANGELOG.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..4435abb --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +**Description of the change** + +Clearly and concisely describe the purpose of the pull request. If this PR relates to an existing issue or change proposal, please link to it. Include any other background context that would help reviewers understand the motivation for this PR. + +--- + +**Checklist:** + +- [ ] Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)") +- [ ] Linked any existing issues or proposals that this pull request should close +- [ ] Updated or added relevant documentation +- [ ] Added a test for the contribution (if applicable) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8babc25 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,79 @@ +# Changelog + +Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +Breaking changes: + +New features: + +Bugfixes: + +Other improvements: + +## [v4.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v4.0.0) - 2018-05-23 + +- Updated for PureScript 0.12 +- Added various `Foldable`-related instances (@matthewleon) + +## [v3.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v3.0.0) - 2017-03-26 + +- Updated for PureScript 0.11 + +## [v2.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v2.0.0) - 2016-10-02 + +- Updated dependencies + +## [v1.0.1](https://github.com/purescript/purescript-lazy/releases/tag/v1.0.1) - 2016-09-18 + +- Avoid use of `delete` in JS implementation #16 (@rightfold) + +## [v1.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v1.0.0) - 2016-06-01 + +This release is intended for the PureScript 0.9.1 compiler and newer. + +**Note**: The v1.0.0 tag is not meant to indicate the library is “finished”, the core libraries are all being bumped to this for the 0.9 compiler release so as to use semver more correctly. + +## [v0.4.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.4.1) - 2016-04-20 + +- Functionally equivalent to v0.4.0, update allows publishing on Pursuit. + +## [v1.0.0-rc.1](https://github.com/purescript/purescript-lazy/releases/tag/v1.0.0-rc.1) - 2016-03-25 + +- Release candidate for the psc 0.8+ core libraries + +## [v0.4.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.4.0) - 2015-06-30 + +This release works with versions 0.7.\* of the PureScript compiler. It will not work with older versions. If you are using an older version, you should require an older, compatible version of this library. + +## [v0.4.0-rc.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.4.0-rc.1) - 2015-06-06 + +Initial release candidate of the library intended for the 0.7 compiler. + +## [v0.3.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.3.1) - 2015-03-19 + +Update docs, improve running time of `fromArray`. + +## [v0.3.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.3.0) - 2015-02-21 + +**This release requires PureScript v0.6.8 or later** +- Updated dependencies + +## [v0.2.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.2.0) - 2015-01-10 + +- Updated `purescript-foldable-traversable` dependency (@garyb) + +## [v0.1.2](https://github.com/purescript/purescript-lazy/releases/tag/v0.1.2) - 2014-12-11 + + + +## [v0.1.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.1.1) - 2014-10-19 + +- Add `Extend` and `Comonad` instances (@natefaubion) +- Remove quickcheck dependency and update dependency versions (@jdegoes) + +## [v0.1.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.1.0) - 2014-08-15 + + + From 331bc93b36f2452aa3c3bc901c84dd4bac53791f Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sun, 24 Jan 2021 12:42:16 -0800 Subject: [PATCH 4/8] Updated changelog since v4.0.0 (#34) * Updated changelog since v4.0.0 * Update CHANGELOG.md --- CHANGELOG.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8babc25..5eddea0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,17 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] Breaking changes: +- Added support for PureScript 0.14 and dropped support for all previous versions (#29) New features: +- Added roles declarations to allow safe coercions (#28) Bugfixes: Other improvements: +- Removed `fold1` member from `Foldable1` and added `foldr1` and `foldl1` (#30, #32) +- Migrated CI to GitHub Actions and updated installation instructions to use Spago (#31) +- Added a changelog and pull request template (#33) ## [v4.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v4.0.0) - 2018-05-23 @@ -27,7 +32,7 @@ Other improvements: ## [v1.0.1](https://github.com/purescript/purescript-lazy/releases/tag/v1.0.1) - 2016-09-18 -- Avoid use of `delete` in JS implementation #16 (@rightfold) +- Removed use of `delete` in JS implementation (#16 by @rightfold) ## [v1.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v1.0.0) - 2016-06-01 @@ -47,17 +52,14 @@ This release is intended for the PureScript 0.9.1 compiler and newer. This release works with versions 0.7.\* of the PureScript compiler. It will not work with older versions. If you are using an older version, you should require an older, compatible version of this library. -## [v0.4.0-rc.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.4.0-rc.1) - 2015-06-06 - -Initial release candidate of the library intended for the 0.7 compiler. - ## [v0.3.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.3.1) - 2015-03-19 -Update docs, improve running time of `fromArray`. +- Updated docs, improved running time of `fromArray`. ## [v0.3.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.3.0) - 2015-02-21 **This release requires PureScript v0.6.8 or later** + - Updated dependencies ## [v0.2.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.2.0) - 2015-01-10 @@ -66,14 +68,13 @@ Update docs, improve running time of `fromArray`. ## [v0.1.2](https://github.com/purescript/purescript-lazy/releases/tag/v0.1.2) - 2014-12-11 - +- Bumped `array` dependency ## [v0.1.1](https://github.com/purescript/purescript-lazy/releases/tag/v0.1.1) - 2014-10-19 -- Add `Extend` and `Comonad` instances (@natefaubion) -- Remove quickcheck dependency and update dependency versions (@jdegoes) +- Added `Extend` and `Comonad` instances (@natefaubion) +- Removed quickcheck dependency and update dependency versions (@jdegoes) ## [v0.1.0](https://github.com/purescript/purescript-lazy/releases/tag/v0.1.0) - 2014-08-15 - - +- Initial versioned release From 2f73f61e7ac1ae1cfe05564112e3313530e673ff Mon Sep 17 00:00:00 2001 From: Cyril Date: Fri, 26 Feb 2021 19:21:04 +0100 Subject: [PATCH 5/8] Prepare v5.0.0 release (#35) * Update CI to build with the latest version of the compiler * Update the bower repository URL to match the URL in the registry * Upgrade bower dependencies * Update the changelog --- .github/workflows/ci.yml | 2 -- CHANGELOG.md | 10 ++++++++++ bower.json | 10 +++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4f44e5..43d2897 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,6 @@ jobs: - uses: actions/checkout@v2 - uses: purescript-contrib/setup-purescript@main - with: - purescript: "0.14.0-rc5" - uses: actions/setup-node@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eddea0..f3a4e19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] +Breaking changes: + +New features: + +Bugfixes: + +Other improvements: + +## [v5.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v5.0.0) - 2021-02-26 + Breaking changes: - Added support for PureScript 0.14 and dropped support for all previous versions (#29) diff --git a/bower.json b/bower.json index 405fc93..16c4591 100644 --- a/bower.json +++ b/bower.json @@ -9,7 +9,7 @@ "license": "BSD-3-Clause", "repository": { "type": "git", - "url": "git://github.com/purescript/purescript-lazy.git" + "url": "https://github.com/purescript/purescript-lazy.git" }, "ignore": [ "**/.*", @@ -20,9 +20,9 @@ "package.json" ], "dependencies": { - "purescript-control": "master", - "purescript-foldable-traversable": "master", - "purescript-invariant": "master", - "purescript-prelude": "master" + "purescript-control": "^5.0.0", + "purescript-foldable-traversable": "^5.0.0", + "purescript-invariant": "^5.0.0", + "purescript-prelude": "^5.0.0" } } From 914a99f964e2dc9868b747a3ff9477bed7e0e78c Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Mon, 14 Mar 2022 16:15:13 -0700 Subject: [PATCH 6/8] Update to v0.15.0 (#39) * Convert foreign modules to try bundling with esbuild * Replaced 'export var' with 'export const' * Removed '"use strict";' in FFI files * Update to CI to use 'unstable' purescript * Update pulp to 16.0.0-0 and psa to 0.8.2 * Update Bower dependencies to master * Update .eslintrc.json to ES6 * Added changelog entry Co-authored-by: Cyril Sobierajewicz --- .eslintrc.json | 6 ++---- .github/workflows/ci.yml | 2 ++ CHANGELOG.md | 1 + bower.json | 8 ++++---- package.json | 4 ++-- src/Data/Lazy.js | 6 ++---- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 84cef4f..1c6afb9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,9 @@ { "parserOptions": { - "ecmaVersion": 5 + "ecmaVersion": 6, + "sourceType": "module" }, "extends": "eslint:recommended", - "env": { - "commonjs": true - }, "rules": { "strict": [2, "global"], "block-scoped-var": 2, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43d2897..b6ebf3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v2 - uses: purescript-contrib/setup-purescript@main + with: + purescript: "unstable" - uses: actions/setup-node@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index f3a4e19..89f4ade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] Breaking changes: +- Migrate FFI to ES modules (#39 by @kl0tl and @JordanMartinez) New features: diff --git a/bower.json b/bower.json index 16c4591..82f1536 100644 --- a/bower.json +++ b/bower.json @@ -20,9 +20,9 @@ "package.json" ], "dependencies": { - "purescript-control": "^5.0.0", - "purescript-foldable-traversable": "^5.0.0", - "purescript-invariant": "^5.0.0", - "purescript-prelude": "^5.0.0" + "purescript-control": "master", + "purescript-foldable-traversable": "master", + "purescript-invariant": "master", + "purescript-prelude": "master" } } diff --git a/package.json b/package.json index 1c67b54..4ea39f9 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ }, "devDependencies": { "eslint": "^7.15.0", - "pulp": "^15.0.0", - "purescript-psa": "^0.8.0", + "pulp": "16.0.0-0", + "purescript-psa": "^0.8.2", "rimraf": "^3.0.2" } } diff --git a/src/Data/Lazy.js b/src/Data/Lazy.js index 4f4e1ac..cabd8ae 100644 --- a/src/Data/Lazy.js +++ b/src/Data/Lazy.js @@ -1,6 +1,4 @@ -"use strict"; - -exports.defer = function (thunk) { +export const defer = function (thunk) { var v = null; return function() { if (thunk === undefined) return v; @@ -11,6 +9,6 @@ exports.defer = function (thunk) { }; }; -exports.force = function (l) { +export const force = function (l) { return l(); }; From 48347841226b27af5205a1a8ec71e27a93ce86fd Mon Sep 17 00:00:00 2001 From: JordanMartinez Date: Wed, 27 Apr 2022 15:24:26 -0500 Subject: [PATCH 7/8] Prepare v6.0.0 release (1st PS 0.15.0-compatible release) (#40) * Update the bower dependencies * Update Node to 14 in CI * Update the changelog --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 10 ++++++++++ bower.json | 8 ++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6ebf3a..c69237a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: with: purescript: "unstable" - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: "12" + node-version: "14.x" - name: Install dependencies run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f4ade..c4742a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] +Breaking changes: + +New features: + +Bugfixes: + +Other improvements: + +## [v6.0.0](https://github.com/purescript/purescript-lazy/releases/tag/v6.0.0) - 2022-04-27 + Breaking changes: - Migrate FFI to ES modules (#39 by @kl0tl and @JordanMartinez) diff --git a/bower.json b/bower.json index 82f1536..8b6d9b3 100644 --- a/bower.json +++ b/bower.json @@ -20,9 +20,9 @@ "package.json" ], "dependencies": { - "purescript-control": "master", - "purescript-foldable-traversable": "master", - "purescript-invariant": "master", - "purescript-prelude": "master" + "purescript-control": "^6.0.0", + "purescript-foldable-traversable": "^6.0.0", + "purescript-invariant": "^6.0.0", + "purescript-prelude": "^6.0.0" } } From 5164b9c3aaa5904dd5b5f829adb903e7abc0bc7c Mon Sep 17 00:00:00 2001 From: aranchelk Date: Mon, 25 Jul 2022 21:29:00 -0400 Subject: [PATCH 8/8] Update Lazy.purs (#36) Improve accuracy of the description of the force function. --- src/Data/Lazy.purs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Data/Lazy.purs b/src/Data/Lazy.purs index 9fe6117..636148a 100644 --- a/src/Data/Lazy.purs +++ b/src/Data/Lazy.purs @@ -34,7 +34,8 @@ type role Lazy representational -- | Defer a computation, creating a `Lazy` value. foreign import defer :: forall a. (Unit -> a) -> Lazy a --- | Force evaluation of a `Lazy` value. +-- | Extract the result of a `Lazy` value by either forcing evaluation or +-- | by retrieving the saved result of a previously forced evaluation. foreign import force :: forall a. Lazy a -> a instance semiringLazy :: Semiring a => Semiring (Lazy a) where