From 54ccbbb9ebde9cb42c5c425266b298668eb3df43 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 29 Dec 2019 14:21:13 +0100 Subject: compiler: do not require sidecar file GitHub: closes #4 --- compiler/src/Files.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/src/Files.hs') diff --git a/compiler/src/Files.hs b/compiler/src/Files.hs index 079da61..d1363a1 100644 --- a/compiler/src/Files.hs +++ b/compiler/src/Files.hs @@ -23,7 +23,7 @@ module Files ( FileName, LocalPath, WebPath, Path - , (), (), localPath, webPath + , (), (), (<.>), localPath, webPath , FSNode(..), AnchoredFSNode(..) , nodePath, nodeName, isHidden, flattenDir, filterDir, readDirectory , ensureParentDir, remove, isOutdated @@ -62,6 +62,9 @@ path ) :: FileName -> Path -> Path file /> path = path ++ [file] +(<.>) :: Path -> String -> Path +(filename:pathto) <.> ext = System.FilePath.addExtension filename ext : pathto + localPath :: Path -> LocalPath localPath = System.FilePath.joinPath . reverse -- cgit v1.2.3