diff options
Diffstat (limited to 'compiler/src/Files.hs')
-rw-r--r-- | compiler/src/Files.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/src/Files.hs b/compiler/src/Files.hs index 53f9c9e..291a1c5 100644 --- a/compiler/src/Files.hs +++ b/compiler/src/Files.hs | |||
@@ -34,9 +34,9 @@ module Files | |||
34 | ) where | 34 | ) where |
35 | 35 | ||
36 | 36 | ||
37 | import Control.Monad (filterM, mapM) | 37 | import Control.Monad (mapM) |
38 | import Data.Bool (bool) | 38 | import Data.Bool (bool) |
39 | import Data.List (isPrefixOf, length, deleteBy, subsequences) | 39 | import Data.List (isPrefixOf, length, subsequences) |
40 | import Data.Function ((&)) | 40 | import Data.Function ((&)) |
41 | import Data.Text (pack) | 41 | import Data.Text (pack) |
42 | import Data.Aeson (ToJSON) | 42 | import Data.Aeson (ToJSON) |
@@ -80,6 +80,7 @@ file /> (Path path) = Path (path ++ [file]) | |||
80 | (<.>) :: Path -> String -> Path | 80 | (<.>) :: Path -> String -> Path |
81 | (Path (filename:pathto)) <.> ext = | 81 | (Path (filename:pathto)) <.> ext = |
82 | Path $ System.FilePath.addExtension filename ext : pathto | 82 | Path $ System.FilePath.addExtension filename ext : pathto |
83 | (Path _) <.> ext = Path [ext] | ||
83 | 84 | ||
84 | fileName :: Path -> Maybe FileName | 85 | fileName :: Path -> Maybe FileName |
85 | fileName (Path (name:_)) = Just name | 86 | fileName (Path (name:_)) = Just name |