packages feed

cmark 0.2.0.2 → 0.3

raw patch · 2 files changed

+26/−18 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- CMark: data Tightness
- CMark: instance Constructor C1_0Tightness
- CMark: instance Constructor C1_1Tightness
- CMark: instance Data Tightness
- CMark: instance Datatype D1Tightness
- CMark: instance Eq Tightness
- CMark: instance Generic Tightness
- CMark: instance Ord Tightness
- CMark: instance Read Tightness
- CMark: instance Show Tightness
- CMark: instance Typeable Tightness
+ CMark: ListAttributes :: ListType -> Bool -> Int -> DelimType -> ListAttributes
+ CMark: data ListAttributes
+ CMark: instance Constructor C1_0ListAttributes
+ CMark: instance Data ListAttributes
+ CMark: instance Datatype D1ListAttributes
+ CMark: instance Eq ListAttributes
+ CMark: instance Generic ListAttributes
+ CMark: instance Ord ListAttributes
+ CMark: instance Read ListAttributes
+ CMark: instance Selector S1_0_0ListAttributes
+ CMark: instance Selector S1_0_1ListAttributes
+ CMark: instance Selector S1_0_2ListAttributes
+ CMark: instance Selector S1_0_3ListAttributes
+ CMark: instance Show ListAttributes
+ CMark: instance Typeable ListAttributes
+ CMark: listDelim :: ListAttributes -> DelimType
+ CMark: listStart :: ListAttributes -> Int
+ CMark: listTight :: ListAttributes -> Bool
+ CMark: listType :: ListAttributes -> ListType
- CMark: LIST :: ListType -> DelimType -> Tightness -> NodeType
+ CMark: LIST :: ListAttributes -> NodeType

Files

CMark.hsc view
@@ -15,7 +15,7 @@   , PosInfo(..)   , DelimType(..)   , ListType(..)-  , Tightness+  , ListAttributes(..)   , Url   , Title   , Level@@ -49,6 +49,13 @@   | ORDERED_LIST   deriving (Show, Read, Eq, Ord, Typeable, Data, Generic) +data ListAttributes = ListAttributes{+    listType     :: ListType+  , listTight    :: Bool+  , listStart    :: Int+  , listDelim    :: DelimType+  } deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)+ type Url = Text  type Title = Text@@ -57,9 +64,6 @@  type Info = Text -data Tightness = TIGHT | LOOSE-  deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)- data NodeType =     DOCUMENT   | HRULE@@ -68,7 +72,7 @@   | HTML Text   | CODE_BLOCK Info Text   | HEADER Level-  | LIST ListType DelimType Tightness+  | LIST ListAttributes   | ITEM   | TEXT Text   | SOFTBREAK@@ -126,7 +130,7 @@              #const CMARK_NODE_CODE_BLOCK                -> CODE_BLOCK info literal              #const CMARK_NODE_LIST-               -> LIST listType listDelim tightness+               -> LIST listAttr              #const CMARK_NODE_ITEM                -> ITEM              #const CMARK_NODE_HEADER@@ -152,17 +156,18 @@              _ -> error "Unknown node type"   where literal   = peekCString $ c_cmark_node_get_literal ptr         level     = c_cmark_node_get_header_level ptr-        listType  = case c_cmark_node_get_list_type ptr of-                         (#const CMARK_ORDERED_LIST) -> ORDERED_LIST-                         (#const CMARK_BULLET_LIST)  -> BULLET_LIST-                         _                           -> BULLET_LIST-        listDelim  = case c_cmark_node_get_list_delim ptr of-                         (#const CMARK_PERIOD_DELIM) -> PERIOD_DELIM-                         (#const CMARK_PAREN_DELIM)  -> PAREN_DELIM-                         _                           -> PERIOD_DELIM-        tightness = case c_cmark_node_get_list_tight ptr of-                         1                           -> TIGHT-                         _                           -> LOOSE+        listAttr  = ListAttributes{+            listType  = case c_cmark_node_get_list_type ptr of+                             (#const CMARK_ORDERED_LIST) -> ORDERED_LIST+                             (#const CMARK_BULLET_LIST)  -> BULLET_LIST+                             _                           -> BULLET_LIST+          , listDelim  = case c_cmark_node_get_list_delim ptr of+                             (#const CMARK_PERIOD_DELIM) -> PERIOD_DELIM+                             (#const CMARK_PAREN_DELIM)  -> PAREN_DELIM+                             _                           -> PERIOD_DELIM+          , listTight  = c_cmark_node_get_list_tight ptr == 1+          , listStart  = c_cmark_node_get_list_start ptr+          }         url       = peekCString $ c_cmark_node_get_url ptr         title     = peekCString $ c_cmark_node_get_title ptr         info      = peekCString $ c_cmark_node_get_fence_info ptr@@ -232,6 +237,9 @@  foreign import ccall "cmark.h cmark_node_get_list_tight"     c_cmark_node_get_list_tight :: NodePtr -> Int++foreign import ccall "cmark.h cmark_node_get_list_start"+    c_cmark_node_get_list_start :: NodePtr -> Int  foreign import ccall "cmark.h cmark_node_get_list_delim"     c_cmark_node_get_list_delim :: NodePtr -> Int
cmark.cabal view
@@ -1,5 +1,5 @@ name:                cmark-version:             0.2.0.2+version:             0.3 synopsis:            Fast, accurate CommonMark (Markdown) parser and renderer description:   This package provides Haskell bindings for