Skip to content

Inconsistent Show instances for maps and sets #39

Description

@kl0tl

The Show instance for maps shows an array:

> Data.Map.fromFoldable [Tuple 0 'a', Tuple 1 'b']
(fromFoldable [(Tuple 0 'a'),(Tuple 1 'b')])

but the Show instances for sets show lists:

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

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

Is there a reason for this inconsistency? Otherwise is it worth changing the Show instances for sets to show arrays instead?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions