aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Distribution/Helper.hs18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs
index 34d7247..0c2fddb 100644
--- a/lib/Distribution/Helper.hs
+++ b/lib/Distribution/Helper.hs
@@ -197,18 +197,12 @@ getProjConfModTime ProjConfV1{pcV1CabalFile} =
[ pcV1CabalFile
]
getProjConfModTime ProjConfV2{..} = do
- mandatory <- mapM getFileModTime $
- [ pcV2CabalProjFile
- ]
- optional <- mapM (traverse getFileModTime <=< mightExist)
- [ pcV2CabalProjLocalFile
- , pcV2CabalProjFreezeFile
- ]
- return $
- ProjConfModTimes $
- mandatory ++
- catMaybes optional
-
+ fmap (ProjConfModTimes . catMaybes) $
+ mapM (traverse getFileModTime <=< mightExist)
+ [ pcV2CabalProjFile
+ , pcV2CabalProjLocalFile
+ , pcV2CabalProjFreezeFile
+ ]
getProjConfModTime ProjConfStack{..} =
fmap ProjConfModTimes $ mapM getFileModTime
[ pcStackYaml