aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Files.hs
diff options
context:
space:
mode:
authorpacien2019-12-31 01:39:23 +0100
committerpacien2019-12-31 01:39:23 +0100
commit7ef9f09c0f3be1cd5e1f38c9abc845abc9ed3639 (patch)
treeb727b960c95feae01f52274013c1ad2ccb01c4d5 /compiler/src/Files.hs
parent856d6ea290f6050e813e9cd5634b9e9960995671 (diff)
downloadldgallery-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.hs7
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
24module Files 24module 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])
80fileName :: Path -> FileName 81fileName :: Path -> FileName
81fileName (Path (name:_)) = name 82fileName (Path (name:_)) = name
82 83
84maybeFileName :: Path -> Maybe FileName
85maybeFileName (Path (name:_)) = Just name
86maybeFileName _ = Nothing
87
83subPaths :: Path -> [Path] 88subPaths :: Path -> [Path]
84subPaths (Path path) = map Path $ subsequences path 89subPaths (Path path) = map Path $ subsequences path
85 90