packages feed

cmark 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+48/−12 lines, 3 filesdep +ghc-primdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: ghc-prim

Dependency ranges changed: base

API changes (from Hackage documentation)

- CMark: LIST :: ListType -> Tightness -> NodeType
+ CMark: LIST :: ListType -> DelimType -> Tightness -> NodeType

Files

CMark.hsc view
@@ -27,8 +27,7 @@ import qualified System.IO.Unsafe as Unsafe import GHC.Generics (Generic) import Data.Generics (Data, Typeable)-import Data.Bits ( (.|.) )-import Data.Text (Text, pack, empty)+import Data.Text (Text, empty) import qualified Data.Text.Foreign as TF  #include <cmark.h>@@ -67,7 +66,7 @@   | HTML Text   | CODE_BLOCK Info Text   | HEADER Level-  | LIST ListType Tightness+  | LIST ListType DelimType Tightness   | ITEM   | TEXT Text   | SOFTBREAK@@ -127,7 +126,7 @@              #const CMARK_NODE_CODE_BLOCK                -> CODE_BLOCK info literal              #const CMARK_NODE_LIST-               -> LIST listType tightness+               -> LIST listType listDelim tightness              #const CMARK_NODE_ITEM                -> ITEM              #const CMARK_NODE_HEADER@@ -150,17 +149,18 @@                -> SOFTBREAK              #const CMARK_NODE_LINEBREAK                -> LINEBREAK+             _ -> 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-        delimType  = case c_cmark_node_get_list_delim ptr of+        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_type ptr of+        tightness = case c_cmark_node_get_list_tight ptr of                          1                           -> TIGHT                          _                           -> LOOSE         url       = peekCString $ c_cmark_node_get_url ptr@@ -183,10 +183,10 @@ handleNode f ptr = f posinfo (ptrToNodeType ptr) children    where children = handleNodes f $ c_cmark_node_first_child ptr          posinfo  = getPosInfo ptr-         handleNodes f ptr =-           if ptr == nullPtr+         handleNodes f' ptr' =+           if ptr' == nullPtr               then []-              else handleNode f ptr : handleNodes f (c_cmark_node_next ptr)+              else handleNode f' ptr' : handleNodes f' (c_cmark_node_next ptr')  toNode :: NodePtr -> Node toNode = handleNode Node
LICENSE view
@@ -13,6 +13,39 @@       disclaimer in the documentation and/or other materials provided       with the distribution. +    * Neither the name of John MacFarlane nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++----+libcmark+Copyright (c) 2014, John MacFarlane++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
cmark.cabal view
@@ -1,5 +1,5 @@ name:                cmark-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Haskell bindings to libcmark, CommonMark parser and renderer description:   This package provides Haskell bindings for@@ -68,12 +68,13 @@   significantly after this early release.  homepage:            https://github.com/jgm/commonmark-hs-license:             BSD2+license:             BSD3 license-file:        LICENSE author:              John MacFarlane maintainer:          jgm@berkeley.edu copyright:           (C) 2015 John MacFarlane category:            Text+tested-with:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.2 build-type:          Simple extra-source-files:  README.md                      cmark/bench.h@@ -103,7 +104,9 @@  library   exposed-modules:     CMark-  build-depends:       base >=4.6 && < 4.8, mtl, syb, text >= 1.1 && < 1.3+  build-depends:       base >=4.5 && < 4.8, mtl, syb, text >= 1.1 && < 1.3+  if impl(ghc < 7.6)+    build-depends:     ghc-prim >= 0.2   default-language:    Haskell2010   ghc-options:         -Wall   Include-dirs:        cmark