modern-uri 0.1.2.0 → 0.1.2.1
raw patch · 5 files changed
+21/−9 lines, 5 filesdep ~criteriondep ~megaparsecPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: criterion, megaparsec
API changes (from Hackage documentation)
- Text.URI: Authority :: Maybe UserInfo -> RText Host -> Maybe Word -> Authority
+ Text.URI: Authority :: Maybe UserInfo -> RText 'Host -> Maybe Word -> Authority
- Text.URI: QueryFlag :: (RText QueryKey) -> QueryParam
+ Text.URI: QueryFlag :: (RText 'QueryKey) -> QueryParam
- Text.URI: QueryParam :: (RText QueryKey) -> (RText QueryValue) -> QueryParam
+ Text.URI: QueryParam :: (RText 'QueryKey) -> (RText 'QueryValue) -> QueryParam
- Text.URI: URI :: Maybe (RText Scheme) -> Either Bool Authority -> [RText PathPiece] -> [QueryParam] -> Maybe (RText Fragment) -> URI
+ Text.URI: URI :: Maybe (RText 'Scheme) -> Either Bool Authority -> [RText 'PathPiece] -> [QueryParam] -> Maybe (RText 'Fragment) -> URI
- Text.URI: UserInfo :: RText Username -> Maybe (RText Password) -> UserInfo
+ Text.URI: UserInfo :: RText 'Username -> Maybe (RText 'Password) -> UserInfo
- Text.URI: [authHost] :: Authority -> RText Host
+ Text.URI: [authHost] :: Authority -> RText 'Host
- Text.URI: [uiPassword] :: UserInfo -> Maybe (RText Password)
+ Text.URI: [uiPassword] :: UserInfo -> Maybe (RText 'Password)
- Text.URI: [uiUsername] :: UserInfo -> RText Username
+ Text.URI: [uiUsername] :: UserInfo -> RText 'Username
- Text.URI: [uriFragment] :: URI -> Maybe (RText Fragment)
+ Text.URI: [uriFragment] :: URI -> Maybe (RText 'Fragment)
- Text.URI: [uriPath] :: URI -> [RText PathPiece]
+ Text.URI: [uriPath] :: URI -> [RText 'PathPiece]
- Text.URI: [uriScheme] :: URI -> Maybe (RText Scheme)
+ Text.URI: [uriScheme] :: URI -> Maybe (RText 'Scheme)
- Text.URI: makeAbsolute :: RText Scheme -> URI -> URI
+ Text.URI: makeAbsolute :: RText 'Scheme -> URI -> URI
- Text.URI: mkFragment :: MonadThrow m => Text -> m (RText Fragment)
+ Text.URI: mkFragment :: MonadThrow m => Text -> m (RText 'Fragment)
- Text.URI: mkHost :: MonadThrow m => Text -> m (RText Host)
+ Text.URI: mkHost :: MonadThrow m => Text -> m (RText 'Host)
- Text.URI: mkPassword :: MonadThrow m => Text -> m (RText Password)
+ Text.URI: mkPassword :: MonadThrow m => Text -> m (RText 'Password)
- Text.URI: mkPathPiece :: MonadThrow m => Text -> m (RText PathPiece)
+ Text.URI: mkPathPiece :: MonadThrow m => Text -> m (RText 'PathPiece)
- Text.URI: mkQueryKey :: MonadThrow m => Text -> m (RText QueryKey)
+ Text.URI: mkQueryKey :: MonadThrow m => Text -> m (RText 'QueryKey)
- Text.URI: mkQueryValue :: MonadThrow m => Text -> m (RText QueryValue)
+ Text.URI: mkQueryValue :: MonadThrow m => Text -> m (RText 'QueryValue)
- Text.URI: mkScheme :: MonadThrow m => Text -> m (RText Scheme)
+ Text.URI: mkScheme :: MonadThrow m => Text -> m (RText 'Scheme)
- Text.URI: mkUsername :: MonadThrow m => Text -> m (RText Username)
+ Text.URI: mkUsername :: MonadThrow m => Text -> m (RText 'Username)
- Text.URI.Lens: _QueryFlag :: Prism' QueryParam (RText QueryKey)
+ Text.URI.Lens: _QueryFlag :: Prism' QueryParam (RText 'QueryKey)
- Text.URI.Lens: _QueryParam :: Prism' QueryParam (RText QueryKey, RText QueryValue)
+ Text.URI.Lens: _QueryParam :: Prism' QueryParam (RText 'QueryKey, RText 'QueryValue)
- Text.URI.Lens: authHost :: Lens' Authority (RText Host)
+ Text.URI.Lens: authHost :: Lens' Authority (RText 'Host)
- Text.URI.Lens: queryFlag :: RText QueryKey -> Getter [QueryParam] Bool
+ Text.URI.Lens: queryFlag :: RText 'QueryKey -> Getter [QueryParam] Bool
- Text.URI.Lens: queryParam :: RText QueryKey -> Traversal' [QueryParam] (RText QueryValue)
+ Text.URI.Lens: queryParam :: RText 'QueryKey -> Traversal' [QueryParam] (RText 'QueryValue)
- Text.URI.Lens: uiPassword :: Lens' UserInfo (Maybe (RText Password))
+ Text.URI.Lens: uiPassword :: Lens' UserInfo (Maybe (RText 'Password))
- Text.URI.Lens: uiUsername :: Lens' UserInfo (RText Username)
+ Text.URI.Lens: uiUsername :: Lens' UserInfo (RText 'Username)
- Text.URI.Lens: uriFragment :: Lens' URI (Maybe (RText Fragment))
+ Text.URI.Lens: uriFragment :: Lens' URI (Maybe (RText 'Fragment))
- Text.URI.Lens: uriPath :: Lens' URI [RText PathPiece]
+ Text.URI.Lens: uriPath :: Lens' URI [RText 'PathPiece]
- Text.URI.Lens: uriScheme :: Lens' URI (Maybe (RText Scheme))
+ Text.URI.Lens: uriScheme :: Lens' URI (Maybe (RText 'Scheme))
Files
- CHANGELOG.md +4/−0
- Text/URI/Parser/ByteString.hs +10/−6
- Text/URI/Parser/Text.hs +5/−1
- Text/URI/QQ.hs +1/−1
- modern-uri.cabal +1/−1
CHANGELOG.md view
@@ -1,3 +1,7 @@+## Modern URI 0.1.2.1++* Allow Megaparsec 6.4.0.+ ## Modern URI 0.1.2.0 * Fixed handling of `+` in query strings. Now `+` is parsed as space and
Text/URI/Parser/ByteString.hs view
@@ -9,17 +9,17 @@ -- -- URI parser for string 'ByteString', an internal module. -{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RecordWildCards #-} module Text.URI.Parser.ByteString ( parserBs ) where -import Control.Applicative import Control.Monad import Control.Monad.Catch (MonadThrow (..)) import Data.ByteString (ByteString)@@ -37,6 +37,10 @@ import qualified Data.Set as E import qualified Data.Text.Encoding as TE import qualified Text.Megaparsec.Byte.Lexer as L++#if !MIN_VERSION_megaparsec(6,4,0)+import Control.Applicative (empty)+#endif -- | This parser can be used to parse 'URI' from strict 'ByteString'. -- Remember to use a concrete non-polymorphic parser type for efficiency.
Text/URI/Parser/Text.hs view
@@ -9,6 +9,7 @@ -- -- URI parser for strict 'Text', an internal module. +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-}@@ -20,7 +21,6 @@ , parser ) where -import Control.Applicative import Control.Monad import Control.Monad.Catch (MonadThrow (..)) import Data.Maybe (isJust, catMaybes)@@ -34,6 +34,10 @@ import qualified Data.List.NonEmpty as NE import qualified Data.Text.Encoding as TE import qualified Text.Megaparsec.Char.Lexer as L++#if !MIN_VERSION_megaparsec(6,4,0)+import Control.Applicative (empty)+#endif -- | Construct a 'URI' from 'Text'. The input you pass to 'mkURI' must be a -- valid URI as per RFC 3986, that is, its components should be
Text/URI/QQ.hs view
@@ -106,5 +106,5 @@ -- | Lift strict 'T.Text' to @'Q' 'Exp'@. -liftText :: T.Text -> Q Exp+liftText :: Text -> Q Exp liftText txt = AppE (VarE 'T.pack) <$> lift (T.unpack txt)
modern-uri.cabal view
@@ -1,5 +1,5 @@ name: modern-uri-version: 0.1.2.0+version: 0.1.2.1 cabal-version: >= 1.18 tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2 license: BSD3