modern-uri 0.2.0.0 → 0.2.1.0
raw patch · 4 files changed
+30/−2 lines, 4 filesdep ~criteriondep ~exceptionsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: criterion, exceptions
API changes (from Hackage documentation)
+ Text.URI: emptyURI :: URI
Files
- CHANGELOG.md +4/−0
- Text/URI.hs +14/−0
- modern-uri.cabal +2/−2
- tests/Text/URISpec.hs +10/−0
CHANGELOG.md view
@@ -1,3 +1,7 @@+## Modern URI 0.2.1.0++* Added `emptyURI`—`URI` value representing the empty URI.+ ## Modern URI 0.2.0.0 * Changed the type of `uriPath` field of the `URI` record from `[RText
Text/URI.hs view
@@ -28,6 +28,7 @@ ( -- * Data types URI (..) , mkURI+ , emptyURI , makeAbsolute , isPathAbsolute , relativeTo@@ -72,6 +73,19 @@ import Text.URI.Render import Text.URI.Types import qualified Data.List.NonEmpty as NE++-- | The empty 'URI'.+--+-- @since 0.2.1.0++emptyURI :: URI+emptyURI = URI+ { uriScheme = Nothing+ , uriAuthority = Left False+ , uriPath = Nothing+ , uriQuery = []+ , uriFragment = Nothing+ } -- $rtext --
modern-uri.cabal view
@@ -1,5 +1,5 @@ name: modern-uri-version: 0.2.0.0+version: 0.2.1.0 cabal-version: >= 1.18 tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2 license: BSD3@@ -82,7 +82,7 @@ type: exitcode-stdio-1.0 build-depends: base >= 4.7 && < 5.0 , bytestring >= 0.2 && < 0.11- , criterion >= 0.6.2.1 && < 1.3+ , criterion >= 0.6.2.1 && < 1.4 , megaparsec >= 6.0 && < 7.0 , modern-uri , text >= 0.2 && < 1.3
tests/Text/URISpec.hs view
@@ -39,6 +39,16 @@ , elabel "path piece" , eeof ] URI.mkURI "что-то" `shouldThrow` (== URI.ParseException "что-то" e)+ describe "emptyURI" $ do+ it "parsing of empty input produces emptyURI" $+ URI.mkURI "" `shouldReturn` URI.emptyURI+ context "rendering of emptyURI produces empty output" $ do+ it "with render" $+ URI.render URI.emptyURI `shouldBe` ""+ it "with renderBs" $+ URI.renderBs URI.emptyURI `shouldBe` ""+ it "with renderStr" $+ URI.renderStr URI.emptyURI `shouldBe` "" describe "makeAbsolute" $ do context "when given URI already has scheme" $ it "returns that URI unchanged" $