From e7549aac67bfb89f3f7e229e11c30ae02f1cdf10 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 1 Apr 2015 23:14:59 -0400 Subject: micro-opt --- Utility/Path.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utility/Path.hs b/Utility/Path.hs index 6ecec2c5f..755436448 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -178,7 +178,7 @@ prop_relPathDirToFile_regressionTest = same_dir_shortcurcuits_at_difference segmentPaths :: [FilePath] -> [FilePath] -> [[FilePath]] segmentPaths [] new = [new] segmentPaths [_] new = [new] -- optimisation -segmentPaths (l:ls) new = [found] ++ segmentPaths ls rest +segmentPaths (l:ls) new = found : segmentPaths ls rest where (found, rest)=partition (l `dirContains`) new -- cgit v1.2.3