diff options
author | pacien | 2020-01-05 16:24:02 +0100 |
---|---|---|
committer | pacien | 2020-01-05 16:24:02 +0100 |
commit | 9dd271504160b624284dbc438cdc867b6ca0d0e7 (patch) | |
tree | 8701aa1897e664aab1f80a7952dbdc5c0c27624c /compiler/src/Files.hs | |
parent | abdf82bbfde843a87bd00746f52dafdd28f3f60b (diff) | |
download | ldgallery-9dd271504160b624284dbc438cdc867b6ca0d0e7.tar.gz |
compiler: enable warnings and fix them
GitHub: fixes #9
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 |