diff options
author | OzoneGrif | 2020-02-14 06:30:50 +0100 |
---|---|---|
committer | GitHub | 2020-02-14 06:30:50 +0100 |
commit | 7b1b84e3e56a6de69ba2bb952a284c617a4b102e (patch) | |
tree | af3ee8ef89478e7d11cecdf1d7a6efeb1ab540a5 /compiler | |
parent | 8d152ccf3cc939a7141654b09de4b9c379def9d5 (diff) | |
parent | 7a8bad610472a0197f990dd5f28829f73fc0346e (diff) | |
download | ldgallery-7b1b84e3e56a6de69ba2bb952a284c617a4b102e.tar.gz |
Merge pull request #127 from pacien/compiler-ordered-index
compiler: stabilise item order in index
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/Files.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/src/Files.hs b/compiler/src/Files.hs index 8ea943f..8a53b84 100644 --- a/compiler/src/Files.hs +++ b/compiler/src/Files.hs | |||
@@ -29,7 +29,7 @@ module Files | |||
29 | 29 | ||
30 | 30 | ||
31 | import Control.Monad (mapM) | 31 | import Control.Monad (mapM) |
32 | import Data.List (isPrefixOf, length, subsequences) | 32 | import Data.List (isPrefixOf, length, subsequences, sortOn) |
33 | import Data.Function ((&)) | 33 | import Data.Function ((&)) |
34 | import Data.Text (pack) | 34 | import Data.Text (pack) |
35 | import Data.Aeson (ToJSON) | 35 | import Data.Aeson (ToJSON) |
@@ -154,6 +154,7 @@ readDirectory root = mkNode (Path []) >>= return . AnchoredFSNode root | |||
154 | mkDirNode path canonicalPath = | 154 | mkDirNode path canonicalPath = |
155 | (listDirectory $ localPath (root /> path)) | 155 | (listDirectory $ localPath (root /> path)) |
156 | >>= mapM (mkNode . ((</) path)) | 156 | >>= mapM (mkNode . ((</) path)) |
157 | >>= return . sortOn nodeName | ||
157 | >>= return . Dir path canonicalPath | 158 | >>= return . Dir path canonicalPath |
158 | 159 | ||
159 | copyTo :: FilePath -> AnchoredFSNode -> IO () | 160 | copyTo :: FilePath -> AnchoredFSNode -> IO () |