Skip to content

Commit 502f81a

Browse files
committed
Add Eq, Ord Signal instances
1 parent 91a66f4 commit 502f81a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Data/Posix/Signal.purs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module Data.Posix.Signal where
22

3-
import Prelude (Show)
3+
import Prelude (Show, Eq, eq, Ord, compare)
4+
import Data.Function (on)
45
import Data.Maybe (Maybe(Just, Nothing))
56

67
data Signal
@@ -135,3 +136,9 @@ fromString s = case s of
135136

136137
instance showSignal :: Show Signal where
137138
show = toString
139+
140+
instance eqSignal :: Eq Signal where
141+
eq = eq `on` toString
142+
143+
instance ordSignal :: Ord Signal where
144+
compare = compare `on` toString

0 commit comments

Comments
 (0)