1- module Data.Argonaut.Core
1+ module Data.Argonaut.Core
22 ( Json (..)
33 , JNull (..)
44 , JBoolean (..)
@@ -56,7 +56,10 @@ module Data.Argonaut.Core
5656 , toString
5757 ) where
5858
59- import Control.Lens (filtered , prism' , PrismP (), TraversalP ())
59+ import Optic.Core (PrismP ())
60+ import Optic.Extended (TraversalP ())
61+ import Optic.Fold (filtered )
62+ import Optic.Prism (prism' )
6063
6164 import Data.Maybe (Maybe (..))
6265 import Data.Tuple (Tuple (..))
@@ -87,22 +90,22 @@ module Data.Argonaut.Core
8790 foldJson a b c d e f json = runFn7 _foldJson a b c d e f json
8891
8992 foldJsonNull :: forall a. a -> (JNull -> a ) -> Json -> a
90- foldJsonNull d f j = runFn7 _foldJson f (const d ) (const d ) (const d ) (const d ) (const d ) j
93+ foldJsonNull d f j = runFn7 _foldJson f (const d ) (const d ) (const d ) (const d ) (const d ) j
9194
9295 foldJsonBoolean :: forall a. a -> (JBoolean -> a ) -> Json -> a
93- foldJsonBoolean d f j = runFn7 _foldJson (const d ) f (const d ) (const d ) (const d ) (const d ) j
96+ foldJsonBoolean d f j = runFn7 _foldJson (const d ) f (const d ) (const d ) (const d ) (const d ) j
9497
9598 foldJsonNumber :: forall a. a -> (JNumber -> a ) -> Json -> a
96- foldJsonNumber d f j = runFn7 _foldJson (const d ) (const d ) f (const d ) (const d ) (const d ) j
99+ foldJsonNumber d f j = runFn7 _foldJson (const d ) (const d ) f (const d ) (const d ) (const d ) j
97100
98101 foldJsonString :: forall a. a -> (JString -> a ) -> Json -> a
99- foldJsonString d f j = runFn7 _foldJson (const d ) (const d ) (const d ) f (const d ) (const d ) j
102+ foldJsonString d f j = runFn7 _foldJson (const d ) (const d ) (const d ) f (const d ) (const d ) j
100103
101104 foldJsonArray :: forall a. a -> (JArray -> a ) -> Json -> a
102- foldJsonArray d f j = runFn7 _foldJson (const d ) (const d ) (const d ) (const d ) f (const d ) j
105+ foldJsonArray d f j = runFn7 _foldJson (const d ) (const d ) (const d ) (const d ) f (const d ) j
103106
104107 foldJsonObject :: forall a. a -> (JObject -> a ) -> Json -> a
105- foldJsonObject d f j = runFn7 _foldJson (const d ) (const d ) (const d ) (const d ) (const d ) f j
108+ foldJsonObject d f j = runFn7 _foldJson (const d ) (const d ) (const d ) (const d ) (const d ) f j
106109
107110 verbJsonType :: forall a b
108111 . b
@@ -162,7 +165,7 @@ module Data.Argonaut.Core
162165 foreign import fromString " function fromString(s){return s;}" :: JString -> Json
163166 foreign import fromArray " function fromArray(a){return a;}" :: JArray -> Json
164167 foreign import fromObject " function fromObject(o){return o;}" :: JObject -> Json
165-
168+
166169 -- Default values
167170
168171 jsonTrue :: Json
@@ -171,7 +174,7 @@ module Data.Argonaut.Core
171174 jsonFalse = fromBoolean false
172175 jsonZero :: Json
173176 jsonZero = fromNumber 0
174- foreign import jsonNull " var jsonNull = null;" :: Json
177+ foreign import jsonNull " var jsonNull = null;" :: Json
175178 jsonEmptyString :: Json
176179 jsonEmptyString = fromString " "
177180 jsonEmptyArray :: Json
@@ -216,15 +219,15 @@ module Data.Argonaut.Core
216219 instance eqJNull :: Eq JNull where
217220 (==) n1 n2 = true
218221
219- (/=) n1 n2 = false
222+ (/=) n1 n2 = false
220223
221- instance ordJNull :: Ord JNull where
224+ instance ordJNull :: Ord JNull where
222225 compare = const <<< const EQ
223226
224227 instance showJson :: Show Json where
225228 show = _stringify
226229
227- instance showJsonNull :: Show JNull where
230+ instance showJsonNull :: Show JNull where
228231 show = const " null"
229232
230233 instance eqJson :: Eq Json where
@@ -233,7 +236,7 @@ module Data.Argonaut.Core
233236 (/=) j j' = not (j == j' )
234237
235238 instance ordJson :: Ord Json where
236- compare a b = runFn5 _compare EQ GT LT a b
239+ compare a b = runFn5 _compare EQ GT LT a b
237240
238241 foreign import _stringify " function _stringify(j){ return JSON.stringify(j); }" :: Json -> String
239242
@@ -267,7 +270,7 @@ module Data.Argonaut.Core
267270 else return LT;
268271 } else if (typeof a === 'boolean') {
269272 if (typeof b === 'boolean') {
270- // boolean / boolean
273+ // boolean / boolean
271274 if (a === b) return EQ;
272275 else if (a == false) return LT;
273276 else return GT;
@@ -335,4 +338,4 @@ module Data.Argonaut.Core
335338 }
336339 }
337340 }
338- " " " :: Fn5 Ordering Ordering Ordering Json Json Ordering
341+ " " " :: Fn5 Ordering Ordering Ordering Json Json Ordering
0 commit comments