packages feed

jsonpatch 0.3.0.1 → 0.3.0.2

raw patch · 3 files changed

+349/−5 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.JSON.Patch.Prelude: (!!) :: HasCallStack => [a] -> Int -> a
- Data.JSON.Patch.Prelude: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Data.JSON.Patch.Prelude: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Data.JSON.Patch.Prelude: (&&) :: Bool -> Bool -> Bool
- Data.JSON.Patch.Prelude: (*) :: Num a => a -> a -> a
- Data.JSON.Patch.Prelude: (**) :: Floating a => a -> a -> a
- Data.JSON.Patch.Prelude: (*>) :: Applicative f => f a -> f b -> f b
- Data.JSON.Patch.Prelude: (+) :: Num a => a -> a -> a
- Data.JSON.Patch.Prelude: (++) :: [a] -> [a] -> [a]
- Data.JSON.Patch.Prelude: (-) :: Num a => a -> a -> a
- Data.JSON.Patch.Prelude: (.) :: (b -> c) -> (a -> b) -> a -> c
- Data.JSON.Patch.Prelude: (/) :: Fractional a => a -> a -> a
- Data.JSON.Patch.Prelude: (/=) :: Eq a => a -> a -> Bool
- Data.JSON.Patch.Prelude: (<$) :: Functor f => a -> f b -> f a
- Data.JSON.Patch.Prelude: (<$>) :: Functor f => (a -> b) -> f a -> f b
- Data.JSON.Patch.Prelude: (<) :: Ord a => a -> a -> Bool
- Data.JSON.Patch.Prelude: (<*) :: Applicative f => f a -> f b -> f a
- Data.JSON.Patch.Prelude: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- Data.JSON.Patch.Prelude: (<=) :: Ord a => a -> a -> Bool
- Data.JSON.Patch.Prelude: (<>) :: Semigroup a => a -> a -> a
- Data.JSON.Patch.Prelude: (=<<) :: Monad m => (a -> m b) -> m a -> m b
- Data.JSON.Patch.Prelude: (==) :: Eq a => a -> a -> Bool
- Data.JSON.Patch.Prelude: (>) :: Ord a => a -> a -> Bool
- Data.JSON.Patch.Prelude: (>=) :: Ord a => a -> a -> Bool
- Data.JSON.Patch.Prelude: (>>) :: Monad m => m a -> m b -> m b
- Data.JSON.Patch.Prelude: (>>=) :: Monad m => m a -> (a -> m b) -> m b
- Data.JSON.Patch.Prelude: (^) :: (Num a, Integral b) => a -> b -> a
- Data.JSON.Patch.Prelude: (^^) :: (Fractional a, Integral b) => a -> b -> a
- Data.JSON.Patch.Prelude: (||) :: Bool -> Bool -> Bool
- Data.JSON.Patch.Prelude: EQ :: Ordering
- Data.JSON.Patch.Prelude: False :: Bool
- Data.JSON.Patch.Prelude: GT :: Ordering
- Data.JSON.Patch.Prelude: Just :: a -> Maybe a
- Data.JSON.Patch.Prelude: LT :: Ordering
- Data.JSON.Patch.Prelude: Left :: a -> Either a b
- Data.JSON.Patch.Prelude: Nothing :: Maybe a
- Data.JSON.Patch.Prelude: Right :: b -> Either a b
- Data.JSON.Patch.Prelude: True :: Bool
- Data.JSON.Patch.Prelude: abs :: Num a => a -> a
- Data.JSON.Patch.Prelude: acos :: Floating a => a -> a
- Data.JSON.Patch.Prelude: acosh :: Floating a => a -> a
- Data.JSON.Patch.Prelude: all :: Foldable t => (a -> Bool) -> t a -> Bool
- Data.JSON.Patch.Prelude: and :: Foldable t => t Bool -> Bool
- Data.JSON.Patch.Prelude: any :: Foldable t => (a -> Bool) -> t a -> Bool
- Data.JSON.Patch.Prelude: appendFile :: FilePath -> String -> IO ()
- Data.JSON.Patch.Prelude: asTypeOf :: a -> a -> a
- Data.JSON.Patch.Prelude: asin :: Floating a => a -> a
- Data.JSON.Patch.Prelude: asinh :: Floating a => a -> a
- Data.JSON.Patch.Prelude: atan :: Floating a => a -> a
- Data.JSON.Patch.Prelude: atan2 :: RealFloat a => a -> a -> a
- Data.JSON.Patch.Prelude: atanh :: Floating a => a -> a
- Data.JSON.Patch.Prelude: break :: (a -> Bool) -> [a] -> ([a], [a])
- Data.JSON.Patch.Prelude: ceiling :: (RealFrac a, Integral b) => a -> b
- Data.JSON.Patch.Prelude: class a ~# b => (a :: k) ~ (b :: k)
- Data.JSON.Patch.Prelude: class Functor f => Applicative (f :: Type -> Type)
- Data.JSON.Patch.Prelude: class () => Bounded a
- Data.JSON.Patch.Prelude: class () => Enum a
- Data.JSON.Patch.Prelude: class () => Eq a
- Data.JSON.Patch.Prelude: class Fractional a => Floating a
- Data.JSON.Patch.Prelude: class () => Foldable (t :: Type -> Type)
- Data.JSON.Patch.Prelude: class Num a => Fractional a
- Data.JSON.Patch.Prelude: class () => Functor (f :: Type -> Type)
- Data.JSON.Patch.Prelude: class (Real a, Enum a) => Integral a
- Data.JSON.Patch.Prelude: class Applicative m => Monad (m :: Type -> Type)
- Data.JSON.Patch.Prelude: class Monad m => MonadFail (m :: Type -> Type)
- Data.JSON.Patch.Prelude: class Semigroup a => Monoid a
- Data.JSON.Patch.Prelude: class () => Num a
- Data.JSON.Patch.Prelude: class Eq a => Ord a
- Data.JSON.Patch.Prelude: class () => Read a
- Data.JSON.Patch.Prelude: class (Num a, Ord a) => Real a
- Data.JSON.Patch.Prelude: class (RealFrac a, Floating a) => RealFloat a
- Data.JSON.Patch.Prelude: class (Real a, Fractional a) => RealFrac a
- Data.JSON.Patch.Prelude: class () => Semigroup a
- Data.JSON.Patch.Prelude: class () => Show a
- Data.JSON.Patch.Prelude: class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
- Data.JSON.Patch.Prelude: compare :: Ord a => a -> a -> Ordering
- Data.JSON.Patch.Prelude: concat :: Foldable t => t [a] -> [a]
- Data.JSON.Patch.Prelude: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- Data.JSON.Patch.Prelude: const :: a -> b -> a
- Data.JSON.Patch.Prelude: cos :: Floating a => a -> a
- Data.JSON.Patch.Prelude: cosh :: Floating a => a -> a
- Data.JSON.Patch.Prelude: curry :: ((a, b) -> c) -> a -> b -> c
- Data.JSON.Patch.Prelude: cycle :: HasCallStack => [a] -> [a]
- Data.JSON.Patch.Prelude: data () => Bool
- Data.JSON.Patch.Prelude: data () => Char
- Data.JSON.Patch.Prelude: data () => Double
- Data.JSON.Patch.Prelude: data () => Either a b
- Data.JSON.Patch.Prelude: data () => Float
- Data.JSON.Patch.Prelude: data () => IO a
- Data.JSON.Patch.Prelude: data () => Int
- Data.JSON.Patch.Prelude: data () => Integer
- Data.JSON.Patch.Prelude: data () => Maybe a
- Data.JSON.Patch.Prelude: data () => Ordering
- Data.JSON.Patch.Prelude: data () => Word
- Data.JSON.Patch.Prelude: decodeFloat :: RealFloat a => a -> (Integer, Int)
- Data.JSON.Patch.Prelude: div :: Integral a => a -> a -> a
- Data.JSON.Patch.Prelude: divMod :: Integral a => a -> a -> (a, a)
- Data.JSON.Patch.Prelude: drop :: Int -> [a] -> [a]
- Data.JSON.Patch.Prelude: dropWhile :: (a -> Bool) -> [a] -> [a]
- Data.JSON.Patch.Prelude: either :: (a -> c) -> (b -> c) -> Either a b -> c
- Data.JSON.Patch.Prelude: elem :: (Foldable t, Eq a) => a -> t a -> Bool
- Data.JSON.Patch.Prelude: encodeFloat :: RealFloat a => Integer -> Int -> a
- Data.JSON.Patch.Prelude: enumFrom :: Enum a => a -> [a]
- Data.JSON.Patch.Prelude: enumFromThen :: Enum a => a -> a -> [a]
- Data.JSON.Patch.Prelude: enumFromThenTo :: Enum a => a -> a -> a -> [a]
- Data.JSON.Patch.Prelude: enumFromTo :: Enum a => a -> a -> [a]
- Data.JSON.Patch.Prelude: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- Data.JSON.Patch.Prelude: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
- Data.JSON.Patch.Prelude: even :: Integral a => a -> Bool
- Data.JSON.Patch.Prelude: exp :: Floating a => a -> a
- Data.JSON.Patch.Prelude: exponent :: RealFloat a => a -> Int
- Data.JSON.Patch.Prelude: fail :: MonadFail m => String -> m a
- Data.JSON.Patch.Prelude: filter :: (a -> Bool) -> [a] -> [a]
- Data.JSON.Patch.Prelude: flip :: (a -> b -> c) -> b -> a -> c
- Data.JSON.Patch.Prelude: floatDigits :: RealFloat a => a -> Int
- Data.JSON.Patch.Prelude: floatRadix :: RealFloat a => a -> Integer
- Data.JSON.Patch.Prelude: floatRange :: RealFloat a => a -> (Int, Int)
- Data.JSON.Patch.Prelude: floor :: (RealFrac a, Integral b) => a -> b
- Data.JSON.Patch.Prelude: fmap :: Functor f => (a -> b) -> f a -> f b
- Data.JSON.Patch.Prelude: foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
- Data.JSON.Patch.Prelude: foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
- Data.JSON.Patch.Prelude: foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
- Data.JSON.Patch.Prelude: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
- Data.JSON.Patch.Prelude: foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
- Data.JSON.Patch.Prelude: fromEnum :: Enum a => a -> Int
- Data.JSON.Patch.Prelude: fromInteger :: Num a => Integer -> a
- Data.JSON.Patch.Prelude: fromIntegral :: (Integral a, Num b) => a -> b
- Data.JSON.Patch.Prelude: fromRational :: Fractional a => Rational -> a
- Data.JSON.Patch.Prelude: fst :: (a, b) -> a
- Data.JSON.Patch.Prelude: gcd :: Integral a => a -> a -> a
- Data.JSON.Patch.Prelude: getChar :: IO Char
- Data.JSON.Patch.Prelude: getContents :: IO String
- Data.JSON.Patch.Prelude: getLine :: IO String
- Data.JSON.Patch.Prelude: head :: HasCallStack => [a] -> a
- Data.JSON.Patch.Prelude: id :: a -> a
- Data.JSON.Patch.Prelude: infix 4 `notElem`
- Data.JSON.Patch.Prelude: infixl 1 >>
- Data.JSON.Patch.Prelude: infixl 4 <$>
- Data.JSON.Patch.Prelude: infixl 6 +
- Data.JSON.Patch.Prelude: infixl 7 *
- Data.JSON.Patch.Prelude: infixl 9 !!
- Data.JSON.Patch.Prelude: infixr 0 $!
- Data.JSON.Patch.Prelude: infixr 1 =<<
- Data.JSON.Patch.Prelude: infixr 2 ||
- Data.JSON.Patch.Prelude: infixr 3 &&
- Data.JSON.Patch.Prelude: infixr 5 ++
- Data.JSON.Patch.Prelude: infixr 6 <>
- Data.JSON.Patch.Prelude: infixr 8 ^^
- Data.JSON.Patch.Prelude: infixr 9 .
- Data.JSON.Patch.Prelude: init :: HasCallStack => [a] -> [a]
- Data.JSON.Patch.Prelude: interact :: (String -> String) -> IO ()
- Data.JSON.Patch.Prelude: ioError :: IOError -> IO a
- Data.JSON.Patch.Prelude: isDenormalized :: RealFloat a => a -> Bool
- Data.JSON.Patch.Prelude: isIEEE :: RealFloat a => a -> Bool
- Data.JSON.Patch.Prelude: isInfinite :: RealFloat a => a -> Bool
- Data.JSON.Patch.Prelude: isNaN :: RealFloat a => a -> Bool
- Data.JSON.Patch.Prelude: isNegativeZero :: RealFloat a => a -> Bool
- Data.JSON.Patch.Prelude: iterate :: (a -> a) -> a -> [a]
- Data.JSON.Patch.Prelude: last :: HasCallStack => [a] -> a
- Data.JSON.Patch.Prelude: lcm :: Integral a => a -> a -> a
- Data.JSON.Patch.Prelude: length :: Foldable t => t a -> Int
- Data.JSON.Patch.Prelude: lex :: ReadS String
- Data.JSON.Patch.Prelude: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- Data.JSON.Patch.Prelude: lines :: String -> [String]
- Data.JSON.Patch.Prelude: log :: Floating a => a -> a
- Data.JSON.Patch.Prelude: logBase :: Floating a => a -> a -> a
- Data.JSON.Patch.Prelude: lookup :: Eq a => a -> [(a, b)] -> Maybe b
- Data.JSON.Patch.Prelude: map :: (a -> b) -> [a] -> [b]
- Data.JSON.Patch.Prelude: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
- Data.JSON.Patch.Prelude: mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- Data.JSON.Patch.Prelude: mappend :: Monoid a => a -> a -> a
- Data.JSON.Patch.Prelude: max :: Ord a => a -> a -> a
- Data.JSON.Patch.Prelude: maxBound :: Bounded a => a
- Data.JSON.Patch.Prelude: maximum :: (Foldable t, Ord a) => t a -> a
- Data.JSON.Patch.Prelude: maybe :: b -> (a -> b) -> Maybe a -> b
- Data.JSON.Patch.Prelude: mconcat :: Monoid a => [a] -> a
- Data.JSON.Patch.Prelude: mempty :: Monoid a => a
- Data.JSON.Patch.Prelude: min :: Ord a => a -> a -> a
- Data.JSON.Patch.Prelude: minBound :: Bounded a => a
- Data.JSON.Patch.Prelude: minimum :: (Foldable t, Ord a) => t a -> a
- Data.JSON.Patch.Prelude: mod :: Integral a => a -> a -> a
- Data.JSON.Patch.Prelude: negate :: Num a => a -> a
- Data.JSON.Patch.Prelude: not :: Bool -> Bool
- Data.JSON.Patch.Prelude: notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- Data.JSON.Patch.Prelude: null :: Foldable t => t a -> Bool
- Data.JSON.Patch.Prelude: odd :: Integral a => a -> Bool
- Data.JSON.Patch.Prelude: or :: Foldable t => t Bool -> Bool
- Data.JSON.Patch.Prelude: otherwise :: Bool
- Data.JSON.Patch.Prelude: pi :: Floating a => a
- Data.JSON.Patch.Prelude: pred :: Enum a => a -> a
- Data.JSON.Patch.Prelude: print :: Show a => a -> IO ()
- Data.JSON.Patch.Prelude: product :: (Foldable t, Num a) => t a -> a
- Data.JSON.Patch.Prelude: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
- Data.JSON.Patch.Prelude: pure :: Applicative f => a -> f a
- Data.JSON.Patch.Prelude: putChar :: Char -> IO ()
- Data.JSON.Patch.Prelude: putStr :: String -> IO ()
- Data.JSON.Patch.Prelude: putStrLn :: String -> IO ()
- Data.JSON.Patch.Prelude: quot :: Integral a => a -> a -> a
- Data.JSON.Patch.Prelude: quotRem :: Integral a => a -> a -> (a, a)
- Data.JSON.Patch.Prelude: read :: Read a => String -> a
- Data.JSON.Patch.Prelude: readFile :: FilePath -> IO String
- Data.JSON.Patch.Prelude: readIO :: Read a => String -> IO a
- Data.JSON.Patch.Prelude: readList :: Read a => ReadS [a]
- Data.JSON.Patch.Prelude: readLn :: Read a => IO a
- Data.JSON.Patch.Prelude: readParen :: Bool -> ReadS a -> ReadS a
- Data.JSON.Patch.Prelude: reads :: Read a => ReadS a
- Data.JSON.Patch.Prelude: readsPrec :: Read a => Int -> ReadS a
- Data.JSON.Patch.Prelude: realToFrac :: (Real a, Fractional b) => a -> b
- Data.JSON.Patch.Prelude: recip :: Fractional a => a -> a
- Data.JSON.Patch.Prelude: rem :: Integral a => a -> a -> a
- Data.JSON.Patch.Prelude: repeat :: a -> [a]
- Data.JSON.Patch.Prelude: replicate :: Int -> a -> [a]
- Data.JSON.Patch.Prelude: return :: Monad m => a -> m a
- Data.JSON.Patch.Prelude: reverse :: [a] -> [a]
- Data.JSON.Patch.Prelude: round :: (RealFrac a, Integral b) => a -> b
- Data.JSON.Patch.Prelude: scaleFloat :: RealFloat a => Int -> a -> a
- Data.JSON.Patch.Prelude: scanl :: (b -> a -> b) -> b -> [a] -> [b]
- Data.JSON.Patch.Prelude: scanl1 :: (a -> a -> a) -> [a] -> [a]
- Data.JSON.Patch.Prelude: scanr :: (a -> b -> b) -> b -> [a] -> [b]
- Data.JSON.Patch.Prelude: scanr1 :: (a -> a -> a) -> [a] -> [a]
- Data.JSON.Patch.Prelude: seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b
- Data.JSON.Patch.Prelude: sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
- Data.JSON.Patch.Prelude: sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
- Data.JSON.Patch.Prelude: sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- Data.JSON.Patch.Prelude: show :: Show a => a -> String
- Data.JSON.Patch.Prelude: showChar :: Char -> ShowS
- Data.JSON.Patch.Prelude: showList :: Show a => [a] -> ShowS
- Data.JSON.Patch.Prelude: showParen :: Bool -> ShowS -> ShowS
- Data.JSON.Patch.Prelude: showString :: String -> ShowS
- Data.JSON.Patch.Prelude: shows :: Show a => a -> ShowS
- Data.JSON.Patch.Prelude: showsPrec :: Show a => Int -> a -> ShowS
- Data.JSON.Patch.Prelude: significand :: RealFloat a => a -> a
- Data.JSON.Patch.Prelude: signum :: Num a => a -> a
- Data.JSON.Patch.Prelude: sin :: Floating a => a -> a
- Data.JSON.Patch.Prelude: sinh :: Floating a => a -> a
- Data.JSON.Patch.Prelude: snd :: (a, b) -> b
- Data.JSON.Patch.Prelude: span :: (a -> Bool) -> [a] -> ([a], [a])
- Data.JSON.Patch.Prelude: splitAt :: Int -> [a] -> ([a], [a])
- Data.JSON.Patch.Prelude: sqrt :: Floating a => a -> a
- Data.JSON.Patch.Prelude: subtract :: Num a => a -> a -> a
- Data.JSON.Patch.Prelude: succ :: Enum a => a -> a
- Data.JSON.Patch.Prelude: sum :: (Foldable t, Num a) => t a -> a
- Data.JSON.Patch.Prelude: tail :: HasCallStack => [a] -> [a]
- Data.JSON.Patch.Prelude: take :: Int -> [a] -> [a]
- Data.JSON.Patch.Prelude: takeWhile :: (a -> Bool) -> [a] -> [a]
- Data.JSON.Patch.Prelude: tan :: Floating a => a -> a
- Data.JSON.Patch.Prelude: tanh :: Floating a => a -> a
- Data.JSON.Patch.Prelude: toEnum :: Enum a => Int -> a
- Data.JSON.Patch.Prelude: toInteger :: Integral a => a -> Integer
- Data.JSON.Patch.Prelude: toRational :: Real a => a -> Rational
- Data.JSON.Patch.Prelude: traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
- Data.JSON.Patch.Prelude: truncate :: (RealFrac a, Integral b) => a -> b
- Data.JSON.Patch.Prelude: type FilePath = String
- Data.JSON.Patch.Prelude: type IOError = IOException
- Data.JSON.Patch.Prelude: type Rational = Ratio Integer
- Data.JSON.Patch.Prelude: type ReadS a = String -> [(a, String)]
- Data.JSON.Patch.Prelude: type ShowS = String -> String
- Data.JSON.Patch.Prelude: type String = [Char]
- Data.JSON.Patch.Prelude: uncurry :: (a -> b -> c) -> (a, b) -> c
- Data.JSON.Patch.Prelude: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- Data.JSON.Patch.Prelude: unlines :: [String] -> String
- Data.JSON.Patch.Prelude: until :: (a -> Bool) -> (a -> a) -> a -> a
- Data.JSON.Patch.Prelude: unwords :: [String] -> String
- Data.JSON.Patch.Prelude: unzip :: [(a, b)] -> ([a], [b])
- Data.JSON.Patch.Prelude: unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- Data.JSON.Patch.Prelude: userError :: String -> IOError
- Data.JSON.Patch.Prelude: words :: String -> [String]
- Data.JSON.Patch.Prelude: writeFile :: FilePath -> String -> IO ()
- Data.JSON.Patch.Prelude: zip :: [a] -> [b] -> [(a, b)]
- Data.JSON.Patch.Prelude: zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- Data.JSON.Patch.Prelude: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- Data.JSON.Patch.Prelude: zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- Data.JSON.Patch.Type: [$sel:from:CopyOp] :: CopyOp -> Pointer
- Data.JSON.Patch.Type: [$sel:from:MoveOp] :: MoveOp -> Pointer
- Data.JSON.Patch.Type: [$sel:path:AddOp] :: AddOp -> Pointer
- Data.JSON.Patch.Type: [$sel:path:CopyOp] :: CopyOp -> Pointer
- Data.JSON.Patch.Type: [$sel:path:MoveOp] :: MoveOp -> Pointer
- Data.JSON.Patch.Type: [$sel:path:RemoveOp] :: RemoveOp -> Pointer
- Data.JSON.Patch.Type: [$sel:path:ReplaceOp] :: ReplaceOp -> Pointer
- Data.JSON.Patch.Type: [$sel:path:TestOp] :: TestOp -> Pointer
- Data.JSON.Patch.Type: [$sel:value:AddOp] :: AddOp -> Value
- Data.JSON.Patch.Type: [$sel:value:ReplaceOp] :: ReplaceOp -> Value
- Data.JSON.Patch.Type: [$sel:value:TestOp] :: TestOp -> Value
- Data.JSON.Pointer: [$sel:tokens:Pointer] :: Pointer -> [Token]
+ Data.JSON.Patch.Type: [from] :: MoveOp -> Pointer
+ Data.JSON.Patch.Type: [path] :: TestOp -> Pointer
+ Data.JSON.Patch.Type: [value] :: TestOp -> Value
+ Data.JSON.Pointer: [tokens] :: Pointer -> [Token]
- Data.JSON.Patch.Prelude: class () => Generic a
+ Data.JSON.Patch.Prelude: class Generic a
- Data.JSON.Patch.Prelude: data () => NonEmpty a
+ Data.JSON.Patch.Prelude: data NonEmpty a
- Data.JSON.Patch.Prelude: data () => Text
+ Data.JSON.Patch.Prelude: data Text
- Data.JSON.Patch.Prelude: data () => Vector a
+ Data.JSON.Patch.Prelude: data Vector a

Files

jsonpatch.cabal view
@@ -1,6 +1,6 @@ cabal-version:      1.18 name:               jsonpatch-version:            0.3.0.1+version:            0.3.0.2 license:            AGPL-3 license-file:       COPYING maintainer:         Patrick Brisbin@@ -24,7 +24,10 @@  category:           JSON build-type:         Simple-extra-source-files: tests.json+extra-source-files:+    tests.json+    spec_tests.json+ extra-doc-files:     README.md     CHANGELOG.md
+ spec_tests.json view
@@ -0,0 +1,341 @@+[+  {+    "comment": "4.1. add with missing object",+    "doc": {+      "q": {+        "bar": 2+      }+    },+    "patch": [+      {+        "op": "add",+        "path": "/a/b",+        "value": 1+      }+    ],+    "error": "path /a does not exist -- missing objects are not created recursively"+  },+  {+    "comment": "A.1.  Adding an Object Member",+    "doc": {+      "foo": "bar"+    },+    "patch": [+      {+        "op": "add",+        "path": "/baz",+        "value": "qux"+      }+    ],+    "expected": {+      "baz": "qux",+      "foo": "bar"+    }+  },+  {+    "comment": "A.2.  Adding an Array Element",+    "doc": {+      "foo": [+        "bar",+        "baz"+      ]+    },+    "patch": [+      {+        "op": "add",+        "path": "/foo/1",+        "value": "qux"+      }+    ],+    "expected": {+      "foo": [+        "bar",+        "qux",+        "baz"+      ]+    }+  },+  {+    "comment": "A.3.  Removing an Object Member",+    "doc": {+      "baz": "qux",+      "foo": "bar"+    },+    "patch": [+      {+        "op": "remove",+        "path": "/baz"+      }+    ],+    "expected": {+      "foo": "bar"+    }+  },+  {+    "comment": "A.4.  Removing an Array Element",+    "doc": {+      "foo": [+        "bar",+        "qux",+        "baz"+      ]+    },+    "patch": [+      {+        "op": "remove",+        "path": "/foo/1"+      }+    ],+    "expected": {+      "foo": [+        "bar",+        "baz"+      ]+    }+  },+  {+    "comment": "A.5.  Replacing a Value",+    "doc": {+      "baz": "qux",+      "foo": "bar"+    },+    "patch": [+      {+        "op": "replace",+        "path": "/baz",+        "value": "boo"+      }+    ],+    "expected": {+      "baz": "boo",+      "foo": "bar"+    }+  },+  {+    "comment": "A.6.  Moving a Value",+    "doc": {+      "foo": {+        "bar": "baz",+        "waldo": "fred"+      },+      "qux": {+        "corge": "grault"+      }+    },+    "patch": [+      {+        "op": "move",+        "from": "/foo/waldo",+        "path": "/qux/thud"+      }+    ],+    "expected": {+      "foo": {+        "bar": "baz"+      },+      "qux": {+        "corge": "grault",+        "thud": "fred"+      }+    }+  },+  {+    "comment": "A.7.  Moving an Array Element",+    "doc": {+      "foo": [+        "all",+        "grass",+        "cows",+        "eat"+      ]+    },+    "patch": [+      {+        "op": "move",+        "from": "/foo/1",+        "path": "/foo/3"+      }+    ],+    "expected": {+      "foo": [+        "all",+        "cows",+        "eat",+        "grass"+      ]+    }+  },+  {+    "comment": "A.8.  Testing a Value: Success",+    "doc": {+      "baz": "qux",+      "foo": [+        "a",+        2,+        "c"+      ]+    },+    "patch": [+      {+        "op": "test",+        "path": "/baz",+        "value": "qux"+      },+      {+        "op": "test",+        "path": "/foo/1",+        "value": 2+      }+    ],+    "expected": {+      "baz": "qux",+      "foo": [+        "a",+        2,+        "c"+      ]+    }+  },+  {+    "comment": "A.9.  Testing a Value: Error",+    "doc": {+      "baz": "qux"+    },+    "patch": [+      {+        "op": "test",+        "path": "/baz",+        "value": "bar"+      }+    ],+    "error": "string not equivalent"+  },+  {+    "comment": "A.10.  Adding a nested Member Object",+    "doc": {+      "foo": "bar"+    },+    "patch": [+      {+        "op": "add",+        "path": "/child",+        "value": {+          "grandchild": {}+        }+      }+    ],+    "expected": {+      "foo": "bar",+      "child": {+        "grandchild": {}+      }+    }+  },+  {+    "comment": "A.11.  Ignoring Unrecognized Elements",+    "doc": {+      "foo": "bar"+    },+    "patch": [+      {+        "op": "add",+        "path": "/baz",+        "value": "qux",+        "xyz": 123+      }+    ],+    "expected": {+      "foo": "bar",+      "baz": "qux"+    }+  },+  {+    "comment": "A.12.  Adding to a Non-existent Target",+    "doc": {+      "foo": "bar"+    },+    "patch": [+      {+        "op": "add",+        "path": "/baz/bat",+        "value": "qux"+      }+    ],+    "error": "add to a non-existent target"+  },+  {+    "comment": "A.13 Invalid JSON Patch Document",+    "doc": {+      "foo": "bar"+    },+    "patch": [+      {+        "op": "remove",+        "path": "/baz",+        "value": "qux"+      }+    ],+    "error": "operation has two 'op' members",+    "disabled": true+  },+  {+    "comment": "A.14. ~ Escape Ordering",+    "doc": {+      "/": 9,+      "~1": 10+    },+    "patch": [+      {+        "op": "test",+        "path": "/~01",+        "value": 10+      }+    ],+    "expected": {+      "/": 9,+      "~1": 10+    }+  },+  {+    "comment": "A.15. Comparing Strings and Numbers",+    "doc": {+      "/": 9,+      "~1": 10+    },+    "patch": [+      {+        "op": "test",+        "path": "/~01",+        "value": "10"+      }+    ],+    "error": "number is not equal to string"+  },+  {+    "comment": "A.16. Adding an Array Value",+    "doc": {+      "foo": [+        "bar"+      ]+    },+    "patch": [+      {+        "op": "add",+        "path": "/foo/-",+        "value": [+          "abc",+          "def"+        ]+      }+    ],+    "expected": {+      "foo": [+        "bar",+        [+          "abc",+          "def"+        ]+      ]+    }+  }+]
src/Data/JSON/Pointer/Token.hs view
@@ -25,22 +25,22 @@ import Optics.Core import Text.Read (readMaybe) -data Token = N Int | E | K Key+data Token = K Key | N Int | E   deriving stock (Eq, Show)  -- | Access a key or array index like 'ix', used for indexing tokenL :: Token -> AffineTraversal' Value Value tokenL t = case t of+  K k -> key k   N n -> nth n   E -> atEnd % _Just-  K k -> key k  -- | Access a key or array index like 'at', used for adding or removing atTokenL :: Token -> AffineTraversal' Value (Maybe Value) atTokenL = \case+  K k -> atKey k   N n -> atNth n   E -> atEnd-  K k -> atKey k  tokenFromText :: Text -> Either String Token tokenFromText = \case