Asbestos Supply

2012-04-25 snaplet-environment always returning fallback

posted this SO question a while back http://stackoverflow.com/questions/9879543/snaplet-environment-always-returning-fallback

i was having an issue with the haskell package snaplet-environment - the lookupEnvDefault function wasn't picking up the correct environment, always returning the fallback value.

my snaplet.cfg looked like:

app
{
  environments
  {
    production
    {
      config-url = "http://www.google.com"
    }
  }
}

well, after a lot of trial and error i found that i had to modify the config to look like this:

app
{
  environments
  {
    production
    {
      config-url = ""
    }
  }
}
environments
{
  production
  {
    config-url = "http://www.google.com"
  }
}

this has got to be a bug, right? i guess i'll have to look at the snaplet-environment code sometime... geez!

UPDATE: well thanks to @antipax i've submitted a pull request