ConfigFile 1.1.0 → 1.1.1
raw patch · 2 files changed
+7/−7 lines, 2 files
Files
- ConfigFile.cabal +1/−1
- src/Data/ConfigFile/Monadic.hs +6/−6
ConfigFile.cabal view
@@ -1,5 +1,5 @@ Name: ConfigFile-Version: 1.1.0+Version: 1.1.1 License: LGPL Maintainer: John Goerzen <jgoerzen@complete.org> Author: John Goerzen
src/Data/ConfigFile/Monadic.hs view
@@ -10,6 +10,12 @@ set, setshow, remove_option, add_section, remove_section ) where +import Control.Monad.Error+import System.IO(Handle)+import Data.ConfigFile as Reexporting (SectionSpec, OptionSpec, ConfigParser(..),+ CPErrorData, CPError, emptyCP, Get_C(..), sections, merge, to_string)+import qualified Data.ConfigFile as C+ {- $overview This module reexports a slightly different version of the standard API which makes it more convenient for chaining monadically. Everywhere a 'ConfigParser' was the first argument in a function in the standard API, it is now the last. This lets you rewrite @@ -30,12 +36,6 @@ which may be more elegant in some cases. A future development might be to chain the 'ConfigParser' implicitly with a state monad, which would be yet more elegant. -}--import Control.Monad.Error-import System.IO(Handle)-import Data.ConfigFile as Reexporting (SectionSpec, OptionSpec, ConfigParser(..),- CPErrorData, CPError, emptyCP, Get_C(..), sections, merge, to_string)-import qualified Data.ConfigFile as C simpleAccess :: MonadError CPError m => SectionSpec -> OptionSpec -> ConfigParser -> m String