Skip to content

replace AllApplicative by tensor monoid#4

Merged
bgavran merged 2 commits intobgavran:mainfrom
andrevidela:applicative-from-monoid
Jan 16, 2026
Merged

replace AllApplicative by tensor monoid#4
bgavran merged 2 commits intobgavran:mainfrom
andrevidela:applicative-from-monoid

Conversation

@andrevidela
Copy link

  • Add TensorMonoid and using it for Applicative instance for the extension
  • Add ProdMonoid and using it for Alternative instance for the extension
  • Add SeqMonoid and using it for Monad instance for the extension
  • Remove bespoke definition of AllApplicative, replace is with All TensorMonoid

Incidentally my editor removes all the extra whitespace by default, hopefully that's okay

@bgavran bgavran merged commit 230c0ed into bgavran:main Jan 16, 2026
1 check failed
@bgavran
Copy link
Owner

bgavran commented Jan 16, 2026

This looks good to me.

Done some tweaks:

  • Reorganised new files a bit to follow the existing practices inside the Data.Container directory
  • Changed the unit of TensorMonoid List instance to use 1 instead of 0 (I believe that's the right unit)
  • Removed the legacy 'AllApplicative' in favour of 'All TensorMonoid'
  • Started making the transition of linalg operations to TensorMonoid
  • Added some missing TensorMonoid instances that fail to build for the examples directory (Maybe, BinTreeLeaf, BinTree)

Still todos:

  • Finish making the full transition of linalg operations
  • Go through the Data.Container.Applicative directory and check what can be deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants