swish 0.7.0.1 → 0.7.0.2
raw patch · 3 files changed
+37/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/Swish/QName.hs +12/−3
- src/Swish/RDF/Graph.hs +1/−1
- swish.cabal +24/−2
src/Swish/QName.hs view
@@ -12,8 +12,13 @@ -- Stability : experimental -- Portability : OverloadedStrings ----- This module defines an algebraic datatype for qualified names (QNames).+-- This module defines an algebraic datatype for qualified names (QNames),+-- which represents a 'URI' as the combination of a namespace 'URI'+-- and a local component ('LName'), which can be empty. --+-- Although RDF supports using IRIs, the use of 'URI' here precludes this.+-- There is currently no attempt to convert from an IRI into a URI.+-- -------------------------------------------------------------------------------- -- At present we support using URI references rather than forcing an absolute@@ -37,10 +42,11 @@ import Control.Monad (liftM) -import Data.String (IsString(..))+import Data.Char (isAscii) import Data.Maybe (fromMaybe) import Data.Interned (intern, unintern) import Data.Interned.URI (InternedURI)+import Data.String (IsString(..)) import Network.URI (URI(..), URIAuth(..), parseURIReference) @@ -63,6 +69,8 @@ At present, the local name can not contain spaces or the \'#\', \':\', or \'/\' characters. This restriction is experimental.++The additional restriction of 'Data.Char.isAscii' was added in version @0.7.0.2@. -} newtype LName = LName T.Text deriving (Eq, Ord)@@ -83,7 +91,8 @@ -- | Create a local name. newLName :: T.Text -> Maybe LName-newLName l = if T.any (`elem` " #:/") l then Nothing else Just (LName l)+-- newLName l = if T.any (`elem` " #:/") l then Nothing else Just (LName l)+newLName l = if T.any (\c -> c `elem` " #:/" || not (isAscii c)) l then Nothing else Just (LName l) -- | Extract the local name. getLName :: LName -> T.Text
src/Swish/RDF/Graph.hs view
@@ -62,7 +62,7 @@ -- -- | The 'ToRDFLabel' instance of 'ScopedName' can also be used -- to easily construct 'RDFLabel' versions of the terms defined- -- in `Swish.RDF.Vocabulary`.+ -- in "Swish.RDF.Vocabulary". -- ** RDF terms --
swish.cabal view
@@ -1,5 +1,5 @@ Name: swish-Version: 0.7.0.1+Version: 0.7.0.2 Stability: experimental License: LGPL License-file: LICENSE @@ -44,8 +44,14 @@ . * Complete, ready-to-run, command-line and script-driven programs. .- Changes in version @0.7.0.0@:+ Changes in version @0.7.0.2@: .+ * The @Swish.QName.LName@ type now requires all characters to be+ ASCII. This avoids downstream errors when trying to convert a+ @QName@ to a @URI@.+ .+ Changes in version @0.7.0.1@:+ . * Internal changes to parsing of URI values for NTriples, Turtle, and N3 parsers (error messages will be slightly different when IRIs are used). Unfortunately IRIs are still not supported. @@ -469,6 +475,22 @@ -- we do not have the data files to run this test Executable SwishTest Main-Is: tests/SwishTest.hs++ -- How can we include data files that are only used for+ -- benchmark/tests and do not get installed?+ Benchmark bench-ntriples+ Type: exitcode-stdio-1.0+ Hs-Source-Dirs: bench/+ Other-Modules: Paths_swish+ Main-Is: NTriples.hs+ Build-Depends: base,+ criterion,+ deepseq,+ network,+ swish,+ text++ ghc-options: -Wall -fno-warn-orphans Executable Swish Main-Is: SwishApp.hs