diff options
author | pacien | 2019-12-31 01:39:23 +0100 |
---|---|---|
committer | pacien | 2019-12-31 01:39:23 +0100 |
commit | 7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639 (patch) | |
tree | b727b960c95feae01f52274013c1ad2ccb01c4d5 /compiler/src/Files.hs | |
parent | 856d6ea290f6050e813e9cd5634b9e9960995671 (diff) | |
download | ldgallery-7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639.tar.gz |
compiler: add option to add implicit directory tags
GitHub: closes #7
Diffstat (limited to 'compiler/src/Files.hs')
-rw-r--r-- | compiler/src/Files.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/src/Files.hs b/compiler/src/Files.hs index ed082ba..a6649c8 100644 --- a/compiler/src/Files.hs +++ b/compiler/src/Files.hs | |||
@@ -23,7 +23,8 @@ | |||
23 | 23 | ||
24 | module Files | 24 | module Files |
25 | ( FileName, LocalPath, WebPath, Path | 25 | ( FileName, LocalPath, WebPath, Path |
26 | , (</>), (</), (/>), (<.>), fileName, subPaths, pathLength | 26 | , (</>), (</), (/>), (<.>) |
27 | , fileName, maybeFileName, subPaths, pathLength | ||
27 | , localPath, webPath | 28 | , localPath, webPath |
28 | , FSNode(..), AnchoredFSNode(..) | 29 | , FSNode(..), AnchoredFSNode(..) |
29 | , nodePath, nodeName, isHidden, flattenDir, filterDir, readDirectory | 30 | , nodePath, nodeName, isHidden, flattenDir, filterDir, readDirectory |
@@ -80,6 +81,10 @@ file /> (Path path) = Path (path ++ [file]) | |||
80 | fileName :: Path -> FileName | 81 | fileName :: Path -> FileName |
81 | fileName (Path (name:_)) = name | 82 | fileName (Path (name:_)) = name |
82 | 83 | ||
84 | maybeFileName :: Path -> Maybe FileName | ||
85 | maybeFileName (Path (name:_)) = Just name | ||
86 | maybeFileName _ = Nothing | ||
87 | |||
83 | subPaths :: Path -> [Path] | 88 | subPaths :: Path -> [Path] |
84 | subPaths (Path path) = map Path $ subsequences path | 89 | subPaths (Path path) = map Path $ subsequences path |
85 | 90 | ||