packages feed

hpack 0.35.4 → 0.35.5

raw patch · 3 files changed

+18/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

driver/Main.hs view
@@ -1,9 +1,21 @@+{-# LANGUAGE LambdaCase #-} module Main (main) where  import           System.Environment  import qualified Hpack-import qualified Hpack.Config as Hpack+import           Hpack.Config+import           Control.Exception  main :: IO ()-main = getArgs >>= Hpack.getOptions Hpack.packageConfig >>= mapM_ (uncurry Hpack.hpack)+main = getArgs >>= \ case+  ["list"] -> exposedModules packageConfig >>= mapM_ (putStrLn . unModule)+  args -> Hpack.getOptions packageConfig args >>= mapM_ (uncurry Hpack.hpack)++exposedModules :: FilePath -> IO [Module]+exposedModules file = readPackageConfig defaultDecodeOptions {decodeOptionsTarget = file} >>= \ case+  Left err -> throwIO $ ErrorCall err+  Right result -> return $ modules result+  where+    modules :: DecodeResult -> [Module]+    modules = maybe [] (libraryExposedModules . sectionData) . packageLibrary . decodeResultPackage
hpack.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.3.+-- This file has been generated from package.yaml by hpack version 0.35.4. -- -- see: https://github.com/sol/hpack  name:           hpack-version:        0.35.4+version:        0.35.5 synopsis:       A modern format for Haskell packages description:    See README at <https://github.com/sol/hpack#readme> category:       Development
resources/test/hpack.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.3.+-- This file has been generated from package.yaml by hpack version 0.35.4. -- -- see: https://github.com/sol/hpack  name:           hpack-version:        0.35.4+version:        0.35.5 synopsis:       A modern format for Haskell packages description:    See README at <https://github.com/sol/hpack#readme> category:       Development