purescript-contrib / purescript-profunctor-lenses

Pure profunctor lenses
MIT License
144 stars 52 forks source link

Add `ifolded` and `imapped` (closes #147) #147

Closed twhitehead closed 2 months ago

twhitehead commented 3 months ago

Description of the change

This adds the ifolded and imapped functions to provide an IndexedFold and an IndexedSetter for all instances of FoldableWithIndex and FunctorWithIndex as itraversed provides an IndexedTraversal for all instances of TraversableWithIndex


Checklist:

garyb commented 3 months ago

This PR failure is nothing to do with you, but would you mind updating the package set ref from prepare-0.15 to psc-0.15.15-20240829 or something recent like that? That should fix it!

twhitehead commented 3 months ago

Thanks. Noticed my layout, with respect to line breaks, didn't exactly follow that of the existing file too, so fixed that as well.

twhitehead commented 3 months ago

@garyb Seems to still be dying on some CI build item unrelated to this pull request

...

purescript-refs#6.0.0 bower_components/purescript-refs
├── purescript-effect#4.0.0
└── purescript-prelude#6.0.1
* Building project in /home/runner/work/purescript-profunctor-lenses/purescript-profunctor-lenses
* Unable to parse the version from psa. (It was: v0.9.0)
* Please check that the right executable is on your PATH.
Invalid option `--censor-lib'

Usage: purs COMMAND

  The PureScript compiler and tools
* ERROR: Subcommand terminated with exit code 1

Any ideas? It built fine on my machine using spago once I converted spago.dhall to spago.yaml.

garyb commented 3 months ago

Hmm, yeah this is a pulp and psa build related thing, but I'm not really sure why it's a problem now.

I think changing the CI line:

npx pulp build -- --censor-lib --strict

to just:

npx pulp build

should get it through.

garyb commented 2 months ago

Sorry, looks like you changed the wrong line there. It's not the spago build that is problematic, it's the usage of pulp in the Verify Bower & Pulp task. Line 46 🙂.

I'd edit this myself to make the fix rather than subjecting you to the busywork, but I don't think I can because it's coming from your main branch.

twhitehead commented 2 months ago

Sorry about that. Hopefully I got it right this time. :crossed_fingers:

garyb commented 2 months ago

That did the trick, thanks!