Skip to content

Conversation

satorg
Copy link
Contributor

@satorg satorg commented Feb 3, 2024

A follow up for #4557 – other uses of Applicative.pure(()) are found (with grep) and replaced with .unit.

Note, that there are other places where .pure(()) is in use, however those calls don't belong to Applicative and to replace them the .unit methods have to be added accordingly:

./free/src/main/scala/cats/free/FreeInvariantMonoidal.scala:104:      def unit: FA[S, Unit] = FreeInvariantMonoidal.pure(())
./tests/shared/src/test/scala/cats/tests/IndexedReaderWriterStateTSuite.scala:111:      val rws: ReaderWriterState[String, String, Int, Unit] = ReaderWriterState.pure(())

@satorg satorg self-assigned this Feb 3, 2024
Copy link
Contributor

@johnynek johnynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the code.

@satorg satorg merged commit 4f15360 into typelevel:main Feb 4, 2024
@satorg satorg deleted the replace-pure-with-unit branch February 4, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants