load :: FilePath -> IO Config
load path = do
  yaml <- Yaml.load path
  dir <- listToMaybe . reverse . splitDirectories <$> getCurrentDirectory
  let name = fromMaybe "dependencies" $ Yaml.lookup "name" yaml <|> dir
      deps sec = fromMaybe [] (Yaml.lookup sec yaml)
      mainDeps = deps "main"
      testDeps = deps "test"
  return (name, mainDeps, testDeps)
load :: FilePath -> IO Config
load path = do
  yaml <- Yaml.load path
  dir <- listToMaybe . reverse . splitDirectories <$> getCurrentDirectory
  let name = fromMaybe "dependencies" $ Yaml.lookup "name" yaml <|> dir
      deps sec = fromMaybe [] (Yaml.lookup sec yaml)
      mainDeps = deps "main"
      testDeps = deps "test"
  return (name, mainDeps, testDeps)
load path = do
  yaml <- Yaml.load path
  dir <- listToMaybe . reverse . splitDirectories <$> getCurrentDirectory
  let name = fromMaybe "dependencies" $ Yaml.lookup "name" yaml <|> dir
      deps sec = fromMaybe [] (Yaml.lookup sec yaml)
      mainDeps = deps "main"
      testDeps = deps "test"
  return (name, mainDeps, testDeps)