aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Files.hs
diff options
context:
space:
mode:
authorpacien2020-01-05 16:24:02 +0100
committerpacien2020-01-05 16:24:02 +0100
commit9dd271504160b624284dbc438cdc867b6ca0d0e7 (patch)
tree8701aa1897e664aab1f80a7952dbdc5c0c27624c /compiler/src/Files.hs
parentabdf82bbfde843a87bd00746f52dafdd28f3f60b (diff)
downloadldgallery-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.hs5
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
37import Control.Monad (filterM, mapM) 37import Control.Monad (mapM)
38import Data.Bool (bool) 38import Data.Bool (bool)
39import Data.List (isPrefixOf, length, deleteBy, subsequences) 39import Data.List (isPrefixOf, length, subsequences)
40import Data.Function ((&)) 40import Data.Function ((&))
41import Data.Text (pack) 41import Data.Text (pack)
42import Data.Aeson (ToJSON) 42import 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
84fileName :: Path -> Maybe FileName 85fileName :: Path -> Maybe FileName
85fileName (Path (name:_)) = Just name 86fileName (Path (name:_)) = Just name