diff options
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r-- | compiler/src/Config.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs index 4c9aa40..4826f17 100644 --- a/compiler/src/Config.hs +++ b/compiler/src/Config.hs | |||
@@ -33,8 +33,7 @@ import Resource (Resolution(..)) | |||
33 | 33 | ||
34 | 34 | ||
35 | data CompilerConfig = CompilerConfig | 35 | data CompilerConfig = CompilerConfig |
36 | { galleryName :: String | 36 | { includedDirectories :: [String] |
37 | , includedDirectories :: [String] | ||
38 | , excludedDirectories :: [String] | 37 | , excludedDirectories :: [String] |
39 | , includedFiles :: [String] | 38 | , includedFiles :: [String] |
40 | , excludedFiles :: [String] | 39 | , excludedFiles :: [String] |
@@ -45,8 +44,7 @@ data CompilerConfig = CompilerConfig | |||
45 | 44 | ||
46 | instance FromJSON CompilerConfig where | 45 | instance FromJSON CompilerConfig where |
47 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig | 46 | parseJSON = withObject "CompilerConfig" $ \v -> CompilerConfig |
48 | <$> v .:? "galleryName" .!= "Gallery" | 47 | <$> v .:? "includedDirectories" .!= ["*"] |
49 | <*> v .:? "includedDirectories" .!= ["*"] | ||
50 | <*> v .:? "excludedDirectories" .!= [] | 48 | <*> v .:? "excludedDirectories" .!= [] |
51 | <*> v .:? "includedFiles" .!= ["*"] | 49 | <*> v .:? "includedFiles" .!= ["*"] |
52 | <*> v .:? "excludedFiles" .!= [] | 50 | <*> v .:? "excludedFiles" .!= [] |