File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ Notable changes to this project are documented in this file. The format is based
66
77Breaking changes:
88- Added support for PureScript 0.14 and dropped support for all previous versions (#35 , #43 )
9- - Drop ` Map ` 's ` Semigroup ` and ` Monoid ` instances and provide unbiased instances via ` SemigroupMap ` newtype (#38 )
9+ - Dropped ` Map ` 's ` Semigroup ` and ` Monoid ` instances and provide unbiased instances via a ` SemigroupMap ` newtype instead (#38 )
10+ - Updated the ` Show ` instances for (non empty) sets (#46 )
1011
1112New features:
1213- Added ` Apply ` instance for ` Map ` (#16 )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ instance eq1Set :: Eq1 Set where
7171 eq1 = eq
7272
7373instance showSet :: Show a => Show (Set a ) where
74- show s = " (fromFoldable " <> show (toList s ) <> " )"
74+ show s = " (fromFoldable " <> show (toUnfoldable s :: Array a ) <> " )"
7575
7676instance ordSet :: Ord a => Ord (Set a ) where
7777 compare s1 s2 = compare (toList s1) (toList s2)
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ module Data.Set.NonEmpty
2626
2727import Prelude hiding (map )
2828
29+ import Data.Array.NonEmpty (NonEmptyArray )
2930import Data.Eq (class Eq1 )
3031import Data.Foldable (class Foldable )
3132import Data.List (List , (:))
@@ -56,7 +57,7 @@ instance foldable1NonEmptySet :: Foldable1 NonEmptySet where
5657 foldl1 f = foldl1 f <<< (toUnfoldable1 :: forall a . NonEmptySet a -> NonEmptyList a )
5758
5859instance showNonEmptySet :: Show a => Show (NonEmptySet a ) where
59- show s = " (fromFoldable1 " <> show (toUnfoldable1 s :: NonEmptyList a ) <> " )"
60+ show s = " (fromFoldable1 " <> show (toUnfoldable1 s :: NonEmptyArray a ) <> " )"
6061
6162-- | Create a set with one element.
6263singleton :: forall a . a -> NonEmptySet a
You can’t perform that action at this time.
0 commit comments