Skip to content

Conversation

@kl0tl
Copy link
Member

@kl0tl kl0tl commented Jan 30, 2021

Description of the change

This pull request changes the output of show for Data.Set.Set and Data.Set.NonEmpty.NonEmptySet from this:

> Data.Set.fromFoldable [0, 1]
(fromFoldable (0 : 1 : Nil))

> Data.Set.NonEmpty.fromFoldable [0, 1]
(Just (fromFoldable1 (NonEmptyList (NonEmpty 0 (1 : Nil)))))

to that:

> Data.Set.fromFoldable [0, 1]
(fromFoldable [0,1])

> Data.Set.NonEmpty.fromFoldable [0, 1]
(Just (fromFoldable1 (NonEmptyArray [0,1])))

for consistency with the Show instances for maps and (non empty) lazy lists, which show arrays instead of lists for conciseness.

Close #39.


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)

@JordanMartinez
Copy link
Contributor

If other maintainers don't have any problems with this, I'll merge in the next few days.

@JordanMartinez JordanMartinez merged commit 47ff34f into purescript:master Feb 3, 2021
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.

Inconsistent Show instances for maps and sets

3 participants