Skip to content

Commit 504ded2

Browse files
committed
remove modifySkel
1 parent 9b26f94 commit 504ded2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Cooked/Tweak/Common.hs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ module Cooked.Tweak.Common
1515
viewAllTweak,
1616
setTweak,
1717
overTweak,
18-
modifySkel,
1918
overMaybeTweak,
2019
overMaybeSelectingTweak,
2120
selectP,
@@ -128,15 +127,11 @@ viewAllTweak optic = getTxSkel <&> toListOf optic
128127

129128
-- | The tweak that sets a certain value in the 'TxSkel'.
130129
setTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> a -> m ()
131-
setTweak optic newValue = modifySkel $ set optic newValue
130+
setTweak optic = overTweak optic . const
132131

133132
-- | The tweak that modifies a certain value in the 'TxSkel'.
134133
overTweak :: (MonadTweak m, Is k A_Setter) => Optic' k is TxSkel a -> (a -> a) -> m ()
135-
overTweak optic change = modifySkel $ over optic change
136-
137-
-- | Apply an arbitrary modification function to the 'TxSkel'.
138-
modifySkel :: (MonadTweak m) => (TxSkel -> TxSkel) -> m ()
139-
modifySkel f = getTxSkel >>= putTxSkel . f
134+
overTweak optic change = getTxSkel >>= putTxSkel . over optic change
140135

141136
-- | Like 'overTweak', but only modifies foci on which the argument function
142137
-- returns @Just@ the new focus. Returns a list of the foci that were modified,

0 commit comments

Comments
 (0)