úÎ!FTD¶     Safe1 app-settings/The configuration file is in an invalid format. app-settings!The in-memory configuration data.Safe&'ü app-settingslThe type of a setting. It contains the setting name (key in the configuration file) and its default value.ÀIt is advised to have a module in your project handling settings. In this module, you'd have all the settings declared at the toplevel, and exported. The rest of the application can then do 9getSetting <setting> setSetting <conf> <setting> <value>  and so on.p declares a simple setting. A value for that setting will be stored in the configuration file in a single line.þ however declares a list setting. While it is perfectly fine to store lists using the usual Setting constructor, if you have a list of more complex items, you will get very long lines and a configuration file very difficult to edit or review by hand.IThe ListSetting will store settings using one line per item in the list: ZtestList :: Setting [String] testList = ListSetting "testList" ["list1", "list2", "list3"]+Now the configuration file looks like that: 8testList_1="list1" testList_2="list2" testList_3="list3"6Also note that an empty ListSetting is stored like so:  testList= app-settings>Most of the time you can use the second function you get from  readSettings, wrapped in a  GetSetting> newtype, however sometimes it's nicer to just pass a single n to other functions if you're going to read or write to the configuration. The GetSetting lets you only read.Safe&'QVD  app-settings2Where to look for or store the configuration file. app-settingseAutomatically build the location based on the application name. It will be ~/.<app name>/config.ini. app-settings$Absolute path to a location on disk.  app-settings`Information about the default configuration. Contains all the settings (that you declare using o) and their default values. It is useful when you save a configuration file, if you give this information to Ñ, it will save default options in the configuration file in a commented form, as a form of documentation to a user who would edit the configuration file. However this is completely optional, you can give  " if you don't want this behaviour.  app-settingsHDefault configuration containing no options. It's fine to give that to e if you don't want default settings being written to the configuration file in commented form (see  ) app-settingssee the  documentation. app-settingsUsed in combination with > to register settings. Registering settings is optional, see  . wdefaultSettings :: DefaultConfig defaultSettings = getDefaultConfig $ do setting <setting1> setting <setting2>  app-settings\Read settings from disk. Because it is doing file I/O it is smart to wrap the call with a tryD, as I/O exceptions can be thrown. Also, the function will throw a ÿ if the file is not properly formatted. NOTE that if the file is properly formatted in general, but a value is stored in an invalid format (for instance "hello" for a Double), you will get no error and get the default value for that setting when you attempt to read it.¼This function returns a pair. The first element is the configuration itself, which you can use to save back or modify the configuration. The second element is a function wrapped in the  ÷ newtype. This function allows you to read a configuration option simply by giving that option (without that callback you'd have to call getSetting settings <setting>, so the callback lets you save a parameter). There is no such shortcut for … though, as it's normally used less often and in other contexts, it is probably OK to have that extra parameter for the setSetting.Example of use: ÿreadResult <- try $ readSettings (Path "my.config") case readResult of Right (conf, GetSetting getSetting) -> do let textSize = getSetting fontSize saveSettings emptyDefaultConfig (Path "my.config") conf Left (x :: SomeException) -> error "Error reading the config file!"  app-settingsqIt is advised to run the save within a try call because it does disk I/O, otherwise the call is straightforward. app-settings4Change the value of a setting. You'll have to call ' so that the change is written to disk.           ,app-settings-0.2.0.12-AtyBz9HBl0k6TXuImnITMSData.AppSettingsData.SerializationData.AppSettingsInternalParseExceptionConfSetting ListSetting getSetting' FileLocationAutoFromAppNamePath DefaultConfig GetSettingemptyDefaultConfigsettinggetDefaultConfig readSettings saveSettings setSetting$fShowGetSetting SettingInfovalueuserSetreadConfigFilewriteConfigFileisKeyForListSettinggetSettingValueFromConfdecodeListSetting