Skip to content

Commit

Permalink
Make the predicate type monadic
Browse files Browse the repository at this point in the history
For better composition in monadic context.
  • Loading branch information
harendra-kumar committed Jul 26, 2022
1 parent c663c6f commit 55ae2ff
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 129 deletions.
2 changes: 1 addition & 1 deletion src/Streamly/Coreutils/Cp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ cpShouldOverwrite option src dest =
OverwriteUpdate -> do
r <- test dest isExisting
if r
then test src =<< cmpModifyTime (>) dest
then test src $ cmpModifyTime (>) dest
else return True

-- | @cp option-modifier source destination@. Copy a file or directory.
Expand Down
Loading

0 comments on commit 55ae2ff

Please sign in to comment.