packages feed

xcb-types 0.2.0 → 0.3.0

raw patch · 4 files changed

+31/−15 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.XCB.Types: type MaskPadding = Int
- Data.XCB.Types: ValueParam :: Type -> MaskName -> ListName -> StructElem
+ Data.XCB.Types: ValueParam :: Type -> MaskName -> (Maybe MaskPadding) -> ListName -> StructElem

Files

Data/XCB/FromXML.hs view
@@ -319,8 +319,9 @@     | elem `named` "valueparam" = do         mask_typ <- liftM mkType $ elem `attr` "value-mask-type"         mask_name <- elem `attr` "value-mask-name"+        let mask_pad = elem `attr` "value-mask-pad" >>= readM         list_name <- elem `attr` "value-list-name"-        return $ ValueParam mask_typ mask_name list_name+        return $ ValueParam mask_typ mask_name mask_pad list_name      | elem `named` "exprfield" = do         typ <- liftM mkType $ elem `attr` "type"
Data/XCB/Pretty.hs view
@@ -18,6 +18,8 @@  import Text.PrettyPrint.HughesPJ +import Data.Maybe+ -- |Minimal complete definition: -- -- One of 'pretty' or 'toDoc'.@@ -87,13 +89,23 @@     toDoc (ExprField nm typ expr)           = parens (text nm <+> text "::" <+> toDoc typ)             <+> toDoc expr-    toDoc (ValueParam typ mname lname)+    toDoc (ValueParam typ mname mpad lname)         = text "Valueparam" <+>           text "::" <+>-          hsep (punctuate (char ',') [toDoc typ-                                     ,text mname-                                     ,text lname-                                     ])+          hsep (punctuate (char ',') details)++        where details+                  | isJust mpad =+                      [toDoc typ+                      ,text "mask padding:" <+> toDoc mpad+                      ,text mname+                      ,text lname+                      ]+                  | otherwise =+                      [toDoc typ+                      ,text mname+                      ,text lname+                      ]  instance Pretty XDecl where     toDoc (XStruct nm elems) =
Data/XCB/Types.hs view
@@ -54,7 +54,7 @@                 | List Name Type (Maybe Expression)                 | SField Name Type                 | ExprField Name Type Expression-                | ValueParam Type MaskName ListName+                | ValueParam Type MaskName (Maybe MaskPadding) ListName  deriving (Show)  type Name = String@@ -62,7 +62,7 @@ type Ref = String type MaskName = Name type ListName = Name-+type MaskPadding = Int  -- |Types may include a reference to the containing module. data Type = UnQualType Name
xcb-types.cabal view
@@ -1,26 +1,29 @@ Name:         xcb-types-Version:      0.2.0+Version:      0.3.0 Cabal-Version:  >= 1.2 Synopsis:     Parses XML files used by the XCB project Description:   This package provides types which mirror the structures   used in the XCB code generation XML files.-+  .   See project http://xcb.freedesktop.org/ for more information about the XCB   project.-+  .   The XML files describe the data-types, events and requests used by the   X Protocol, and are used to auto-generate large parts of the XCB project.-- This package parses these XML files into Haskell data structures.-+  .+  This package parses these XML files into Haskell data structures.+  .   If you want to do something with these XML descriptions but don't want   to learn XSLT, this package should help.+  .+  This version of xcb-types is intended to fully parse the X Protocol+  description version 1.3.  License:      BSD3 License-file: LICENSE Author:       Antoine Latter Maintainer:   Antoine Latter <aslatter@gmail.com>-+Homepage: http://community.haskell.org/~aslatter/code/xcb-types Build-type: Simple  Category: Data