Skip to content

Commit 6247163

Browse files
committed
Remove Semigroup Perm instance
If Semigroup is needed, Additive or Multiplicative can be used.
1 parent fe62b9c commit 6247163

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Node/FS/Perms.purs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,11 @@ instance showPerm :: Show Perm where
4646
(if w then ["write"] else []) <>
4747
(if x then ["execute"] else [])
4848

49-
instance semigroupPerm :: Semigroup Perm where
50-
(<>) (Perm { r = r0, w = w0, x = x0 }) (Perm { r = r1, w = w1, x = x1 }) =
51-
Perm { r: r0 || r1, w: w0 || w1, x: x0 || x1 }
52-
5349
instance semiringPerm :: Semiring Perm where
54-
(+) = (<>)
50+
add (Perm { r = r0, w = w0, x = x0 }) (Perm { r = r1, w = w1, x = x1 }) =
51+
Perm { r: r0 || r1, w: w0 || w1, x: x0 || x1 }
5552
zero = none
56-
(*) (Perm { r = r0, w = w0, x = x0 }) (Perm { r = r1, w = w1, x = x1 }) =
53+
mul (Perm { r = r0, w = w0, x = x0 }) (Perm { r = r1, w = w1, x = x1 }) =
5754
Perm { r: r0 && r1, w: w0 && w1, x: x0 && x1 }
5855
one = all
5956

0 commit comments

Comments
 (0)