Skip to content

Commit

Permalink
Replace for with one from Data.Traversable
Browse files Browse the repository at this point in the history
  • Loading branch information
zlondrej committed Oct 31, 2024
1 parent 95c9e7f commit f6ed06b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scrive-prelude.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: scrive-prelude
version: 1.0.3.0
version: 1.0.3.1
author: Scrive AB
maintainer: Scrive AB
copyright: 2021
Expand Down
5 changes: 1 addition & 4 deletions src/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import Data.Monoid.Utils
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import Data.Traversable (for)
import qualified Data.Tuple.Optics as O
import GHC.Generics (Generic)
import qualified GHC.Read as Read
Expand Down Expand Up @@ -202,10 +203,6 @@ copy x fromThis toThat = set x (view x fromThis) toThat

----------------------------------------

-- | Just @flip map@.
for :: [a] -> (a -> b) -> [b]
for = flip map

-- | Read a value and return 'Nothing' if an error occurs during parsing.
maybeRead :: Read a => Text -> Maybe a
maybeRead s =
Expand Down

0 comments on commit f6ed06b

Please sign in to comment.