Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit ffc75d9

Browse files
authored
Merge pull request #50 from colehaus/ord1
Add `Ord1` instance
2 parents 2577352 + 719c2de commit ffc75d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Data/Set.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import Data.List as List
4242
import Data.Map as M
4343
import Data.Maybe (Maybe)
4444
import Data.Monoid (class Monoid)
45+
import Data.Ord (class Ord1)
4546
import Data.Unfoldable (class Unfoldable)
4647

4748
import Partial.Unsafe (unsafePartial)
@@ -72,6 +73,9 @@ instance showSet :: Show a => Show (Set a) where
7273
instance ordSet :: Ord a => Ord (Set a) where
7374
compare s1 s2 = compare (toList s1) (toList s2)
7475

76+
instance ord1Set :: Ord1 Set where
77+
compare1 = compare
78+
7579
instance monoidSet :: Ord a => Monoid (Set a) where
7680
mempty = empty
7781

0 commit comments

Comments
 (0)