diff --git a/ff-core/lib/FF/Config.hs b/ff-core/lib/FF/Config.hs index faf18fe2..0df2e6b5 100644 --- a/ff-core/lib/FF/Config.hs +++ b/ff-core/lib/FF/Config.hs @@ -28,16 +28,17 @@ newtype ConfigUI = ConfigUI deriving (Eq, Show) emptyConfig :: Config -emptyConfig = Config {dataDir = Nothing, externalEditor = Nothing, ui = defaultConfigUI} +emptyConfig = + Config{dataDir = Nothing, externalEditor = Nothing, ui = defaultConfigUI} defaultConfigUI :: ConfigUI defaultConfigUI = ConfigUI {shuffle = False} instance FromJSON Config where parseJSON = withObject "Config" $ \obj -> do - dataDir <- obj .:? "dataDir" + dataDir <- obj .:? "dataDir" externalEditor <- obj .:? "externalEditor" - ui <- obj .:? "ui" .!= defaultConfigUI + ui <- obj .:? "ui" .!= defaultConfigUI pure Config{..} deriveJSON defaultOptions ''ConfigUI