packages feed

haskell-gi 0.26.11 → 0.26.12

raw patch · 5 files changed

+21/−8 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.GI.GIR.Arg: parseTransferString :: Text -> Parser Transfer

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+### 0.26.12+++ Add support for the .gir format dialect generated by vala.+ ### 0.26.11  + Don't try to guess which callback arguments are `user_data` arguments, as this can lead to problems, as in [issue 447](https://github.com/haskell-gi/haskell-gi/issues/447).
haskell-gi.cabal view
@@ -1,5 +1,5 @@ name:                haskell-gi-version:             0.26.11+version:             0.26.12 synopsis:            Generate Haskell bindings for GObject Introspection capable libraries description:         Generate Haskell bindings for GObject Introspection capable libraries. This includes most notably                      Gtk+, but many other libraries in the GObject ecosystem provide introspection data too.
lib/Data/GI/GIR/Arg.hs view
@@ -4,6 +4,7 @@     , Scope(..)     , parseArg     , parseTransfer+    , parseTransferString     ) where  #if !MIN_VERSION_base(4,11,0)@@ -44,12 +45,15 @@         transfer :: Transfer     } deriving (Show, Eq, Ord) -parseTransfer :: Parser Transfer-parseTransfer = getAttr "transfer-ownership" >>= \case+parseTransferString :: Text -> Parser Transfer+parseTransferString transfer = case transfer of                 "none" -> return TransferNothing                 "container" -> return TransferContainer                 "full" -> return TransferEverything                 t -> parseError $ "Unknown transfer type \"" <> t <> "\""++parseTransfer :: Parser Transfer+parseTransfer = getAttr "transfer-ownership" >>= parseTransferString  parseScope :: Text -> Parser Scope parseScope "call" = return ScopeTypeCall
lib/Data/GI/GIR/Constant.hs view
@@ -7,7 +7,7 @@ import Data.Text (Text)  import Data.GI.GIR.BasicTypes (Type)-import Data.GI.GIR.Type (parseType, parseCType)+import Data.GI.GIR.Type (parseType) import Data.GI.GIR.Parser  -- | Info about a constant.@@ -26,7 +26,12 @@   deprecated <- parseDeprecation   value <- getAttr "value"   t <- parseType-  ctype <- parseCType+  -- This contains the C name for the constant. The C gir generator+  -- call this "c:type", while the vala gir generator calls it+  -- "c:identifier", so try both.+  ctype <- queryAttrWithNamespace CGIRNS "type" >>= \case+    Just i -> return i+    Nothing -> getAttrWithNamespace CGIRNS "identifier"   doc <- parseDocumentation   return (name, Constant { constantType = t                          , constantValue = value
lib/Data/GI/GIR/Property.hs view
@@ -9,8 +9,8 @@ import Data.Monoid ((<>)) #endif -import Data.GI.GIR.Arg (parseTransfer)-import Data.GI.GIR.BasicTypes (Transfer, Type)+import Data.GI.GIR.Arg (parseTransferString)+import Data.GI.GIR.BasicTypes (Transfer(..), Type) import Data.GI.GIR.Parser import Data.GI.GIR.Type (parseType) @@ -35,7 +35,7 @@ parseProperty = do   name <- getAttr "name"   t <- parseType-  transfer <- parseTransfer+  transfer <- optionalAttr "transfer-ownership" TransferNothing parseTransferString   deprecated <- parseDeprecation   readable <- optionalAttr "readable" True parseBool   writable <- optionalAttr "writable" False parseBool