Attempt at Abstracted YAML Configuration Loader
Sorry to say this is not good practice. Exactly why is a bit more technical of an explanation than I like to give off the cuff, Google for "Haskell typeclass interface" and you'll find a bunch of threads comparing and contrasting and recommending you use an ADT. Here's one from Reddit with a game programming example that I think is particularly practical.

In your case, I imagine you intend to provide different configuration methods (XML, command line flags, &amp;c) which would also be instances of Config. You've already realized that you want to work with some abstract Config thing elsewhere in your program and not a YamlConfig, because whatever is using a configuration value doesn't care where that value came from. The next logical step is that by making Config a class, you actually are still passing a YamlConfig around everywhere, you're just relying on callers to never look more closely at it than as a generic Config instance. You've got implementation leaking all over the place.

Instead, making Config a datatype.

data Config = Config { outputPath :: FilePath
                     , template   :: String -&gt; FilePath
                     }


Now populate it from a YAML source.

makeConfig :: Yaml.Value -&gt; Config
makeConfig yaml = Config { outputPath = stringYamlLookup ["output", "path"] yaml
                         , template   = \name -&gt; stringYamlLookup ["templates", name] yaml
                         }


It's easy to make arbitrary Configs now. Maybe you want a default Config.

defaultConfig :: Config
defaultConfig = Config { outputPath = "output/"
                       , template   = ("template/" ++)
                       }


You can even make lists of Configs from different sources ([defaultConfig, makeConfig yaml]).