packages feed

proto-lens-protoc 0.4.0.1 → 0.4.0.2

raw patch · 3 files changed

+9/−30 lines, 3 filesdep ~haskell-src-extsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: haskell-src-exts

API changes (from Hackage documentation)

- Data.ProtoLens.Compiler.Combinators: CommentedDecl :: (Maybe String) -> Decl -> CommentedDecl
+ Data.ProtoLens.Compiler.Combinators: CommentedDecl :: Maybe String -> Decl -> CommentedDecl
- Data.ProtoLens.Compiler.Combinators: ImportDecl :: l -> ModuleName l -> Bool -> Bool -> Bool -> Maybe String -> Maybe ModuleName l -> Maybe ImportSpecList l -> ImportDecl l
+ Data.ProtoLens.Compiler.Combinators: ImportDecl :: l -> ModuleName l -> Bool -> Bool -> Bool -> Maybe String -> Maybe (ModuleName l) -> Maybe (ImportSpecList l) -> ImportDecl l
- Data.ProtoLens.Compiler.Combinators: Module :: ModuleName -> (Maybe [ExportSpec]) -> [ModulePragma] -> [ImportDecl ()] -> [CommentedDecl] -> Module
+ Data.ProtoLens.Compiler.Combinators: Module :: ModuleName -> Maybe [ExportSpec] -> [ModulePragma] -> [ImportDecl ()] -> [CommentedDecl] -> Module
- Data.ProtoLens.Compiler.Combinators: [importAs] :: ImportDecl l -> Maybe ModuleName l
+ Data.ProtoLens.Compiler.Combinators: [importAs] :: ImportDecl l -> Maybe (ModuleName l)
- Data.ProtoLens.Compiler.Combinators: [importSpecs] :: ImportDecl l -> Maybe ImportSpecList l
+ Data.ProtoLens.Compiler.Combinators: [importSpecs] :: ImportDecl l -> Maybe (ImportSpecList l)
- Data.ProtoLens.Compiler.Definitions: Enum :: (EnumInfo n) -> Definition n
+ Data.ProtoLens.Compiler.Definitions: Enum :: EnumInfo n -> Definition n
- Data.ProtoLens.Compiler.Definitions: Message :: (MessageInfo n) -> Definition n
+ Data.ProtoLens.Compiler.Definitions: Message :: MessageInfo n -> Definition n

Files

Changelog.md view
@@ -1,5 +1,8 @@ # Changelog for `proto-lens-protoc` +## v0.4.0.2+- Support `haskell-src-exts-1.22.*`, and remove support for `haskell-src-exts-1.17.*`.+ ## v0.4.0.1 - Bump the dependency on `base` and `containers` to support `ghc-8.6.1`. - Fix a GHC error on enums with a very large number of cases (#241).
proto-lens-protoc.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: b29b62b3123ac364956fb075e47b5d2d3c55951136e89ff7972994217d0b2864+-- hash: 71538a306f042a685e226ca1da1db154ba2609f0f69544fbe19c4d061b05325c  name:           proto-lens-protoc-version:        0.4.0.1+version:        0.4.0.2 synopsis:       Protocol buffer compiler for the proto-lens library. description:    Turn protocol buffer files (.proto) into Haskell files (.hs) which can be used with the proto-lens package.                 The library component of this package contains compiler code (namely Data.ProtoLens.Compiler.*) is not guaranteed to have stable APIs.'@@ -41,7 +41,7 @@       base >=4.9 && <4.13     , containers >=0.5 && <0.7     , filepath >=1.4 && <1.6-    , haskell-src-exts >=1.17 && <1.21+    , haskell-src-exts >=1.18 && <1.22     , lens-family ==1.2.*     , pretty ==1.1.*     , proto-lens ==0.4.*
src/Data/ProtoLens/Compiler/Combinators.hs view
@@ -26,30 +26,16 @@  import Data.Char (isAlphaNum, isUpper) import Data.String (IsString(..))-#if MIN_VERSION_haskell_src_exts(1,18,0) import qualified Language.Haskell.Exts.Syntax as Syntax import qualified Language.Haskell.Exts.Pretty as Pretty-#else-import qualified Language.Haskell.Exts.Annotated.Syntax as Syntax-import qualified Language.Haskell.Exts.Pretty as Pretty-import Language.Haskell.Exts.SrcLoc (SrcLoc, noLoc)-#endif import Text.PrettyPrint (($+$), (<+>), render, text, vcat, Doc) -#if MIN_VERSION_haskell_src_exts(1,18,0) prettyPrint :: Pretty.Pretty a => a -> String prettyPrint = Pretty.prettyPrint  prettyPrim :: Pretty.Pretty a => a -> Doc prettyPrim = Pretty.prettyPrim-#else-prettyPrint :: (Functor m, Pretty.Pretty (m SrcLoc)) => m () -> String-prettyPrint = Pretty.prettyPrint . fmap (const noLoc) -prettyPrim :: (Functor m, Pretty.Pretty (m SrcLoc)) => m () -> Doc-prettyPrim = Pretty.prettyPrim . fmap (const noLoc)-#endif- type Asst = Syntax.Asst ()  classA :: QName -> [Type] -> Asst@@ -75,7 +61,9 @@ type Decl = Syntax.Decl ()  patSynSig :: Name -> Type -> Decl-#if MIN_VERSION_haskell_src_exts(1,20,0)+#if MIN_VERSION_haskell_src_exts(1,21,0)+patSynSig n t = Syntax.PatSynSig () [n] Nothing Nothing Nothing Nothing t+#elif MIN_VERSION_haskell_src_exts(1,20,0) patSynSig n t = Syntax.PatSynSig () [n] Nothing Nothing Nothing t #else patSynSig n t = Syntax.PatSynSig () n Nothing Nothing Nothing t@@ -260,21 +248,13 @@ exportVar = Syntax.EVar ()  exportAll :: QName -> ExportSpec-#if MIN_VERSION_haskell_src_exts(1,18,0) exportAll q = Syntax.EThingWith () (Syntax.EWildcard () 0) q []-#else-exportAll = Syntax.EThingAll ()-#endif  exportWith :: QName -> [Name] -> ExportSpec-#if MIN_VERSION_haskell_src_exts(1,18,0) exportWith q = Syntax.EThingWith ()                     (Syntax.NoWildcard ())                     q                     . map (Syntax.ConName ())-#else-exportWith q = Syntax.EThingWith () q . map (Syntax.ConName ())-#endif  type Name = Syntax.Name () @@ -331,11 +311,7 @@                             t  tyBang :: Type -> Type-#if MIN_VERSION_haskell_src_exts(1,18,0) tyBang = Syntax.TyBang () (Syntax.BangedTy ()) (Syntax.NoUnpackPragma ())-#else-tyBang = Syntax.TyBang () (Syntax.BangedTy ())-#endif  -- | Application of a Haskell type or expression to an argument. -- For example, to represent @f x y@, you can write