diff options
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 | ||