Skip to content

Commit 3dc8b03

Browse files
joneshfpaf31
authored andcommitted
Add Semigroup and Monoid instances for Forget (#70)
1 parent 7df3be7 commit 3dc8b03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Data/Lens/Internal/Forget.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ newtype Forget r a b = Forget (a -> r)
2222

2323
derive instance newtypeForget :: Newtype (Forget r a b) _
2424

25+
derive newtype instance semigroupForget :: Semigroup r => Semigroup (Forget r a b)
26+
27+
derive newtype instance monoidForget :: Monoid r => Monoid (Forget r a b)
28+
2529
instance profunctorForget :: Profunctor (Forget r) where
2630
dimap f _ (Forget z) = Forget (z <<< f)
2731

0 commit comments

Comments
 (0)