packages feed

hpack 0.9.0 → 0.9.1

raw patch · 3 files changed

+13/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hpack.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.8.0.+-- This file has been generated from package.yaml by hpack version 0.9.0. -- -- see: https://github.com/sol/hpack  name:           hpack-version:        0.9.0+version:        0.9.1 synopsis:       An alternative format for Haskell packages category:       Development homepage:       https://github.com/sol/hpack#readme
src/Hpack/Config.hs view
@@ -467,6 +467,12 @@     cppOptions = fromMaybeList commonOptionsCppOptions     dependencies = fromMaybeList commonOptionsDependencies +pathsModuleFromPackageName :: String -> String+pathsModuleFromPackageName name = "Paths_" ++ map f name+  where+    f '-' = '_'+    f x = x+ determineModules :: String -> [String] -> Maybe (List String) -> Maybe (List String) -> ([String], [String]) determineModules name modules mExposedModules mOtherModules = case (mExposedModules, mOtherModules) of   (Nothing, Nothing) -> (modules, [])@@ -474,7 +480,7 @@   where     otherModules   = maybe ((modules \\ exposedModules) ++ pathsModule) fromList mOtherModules     exposedModules = maybe (modules \\ otherModules)   fromList mExposedModules-    pathsModule = ["Paths_" ++ name] \\ exposedModules+    pathsModule = [pathsModuleFromPackageName name] \\ exposedModules  getModules :: FilePath -> FilePath -> IO [String] getModules dir src_ = sort <$> do
test/Hpack/ConfigSpec.hs view
@@ -130,8 +130,11 @@     it "adds the Paths_* module to the other-modules" $ do       determineModules "foo" [] (Just $ List ["Foo"]) Nothing `shouldBe` (["Foo"], ["Paths_foo"]) +    it "replaces dashes with underscores in Paths_*" $ do+      determineModules "foo-bar" [] (Just $ List ["Foo"]) Nothing `shouldBe` (["Foo"], ["Paths_foo_bar"])+     context "when the Paths_* module is part of the exposed-modules" $ do-      it "it does not add the Paths_* module to the other-modules" $ do+      it "does not add the Paths_* module to the other-modules" $ do         determineModules "foo" [] (Just $ List ["Foo", "Paths_foo"]) Nothing `shouldBe` (["Foo", "Paths_foo"], [])    describe "readPackageConfig" $ do