Skip to content

Commit

Permalink
Upgrade argonaut library versions for typed errors (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
srghma authored Jun 20, 2020
1 parent 1f6dde0 commit 2b81ce1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"license": "MIT",
"dependencies": {
"purescript-argonaut-codecs": "^6.0.0",
"purescript-argonaut-codecs": "^7.0.0",
"purescript-argonaut-core": "^5.0.0",
"purescript-argonaut-traversals": "^7.0.0"
"purescript-argonaut-traversals": "^8.0.0"
},
"devDependencies": {
"purescript-console": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/Examples/Data/Argonaut/Record.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Examples.Data.Argonaut.Record where

import Prelude

import Data.Argonaut (class EncodeJson, class DecodeJson, Json, encodeJson, fromArray, decodeJson, jsonEmptyObject, (~>), (~>?), (:=), (:=?), (.:), (.:?), (.!=))
import Data.Argonaut (class DecodeJson, class EncodeJson, Json, JsonDecodeError, decodeJson, encodeJson, fromArray, jsonEmptyObject, (.!=), (.:), (.:?), (:=), (:=?), (~>), (~>?))
import Data.Either (Either)
import Data.Maybe (Maybe)
import Data.Traversable (traverse)
Expand Down Expand Up @@ -36,7 +36,7 @@ instance encodeJsonBlogPost :: EncodeJson BlogPost where

type BlogPostArray = Array BlogPost

decodeBlogPostArray :: Json -> Either String BlogPostArray
decodeBlogPostArray :: Json -> Either JsonDecodeError BlogPostArray
decodeBlogPostArray json = decodeJson json >>= traverse decodeJson

encodeBlogPostArray :: BlogPostArray -> Json
Expand Down
4 changes: 2 additions & 2 deletions src/Data/Argonaut.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ module Data.Argonaut


import Data.Argonaut.Core (Json, caseJson, caseJsonArray, caseJsonBoolean, caseJsonNull, caseJsonNumber, caseJsonObject, caseJsonString, fromArray, fromBoolean, fromNumber, fromObject, fromString, isArray, isBoolean, isNull, isNumber, isObject, isString, jsonEmptyArray, jsonEmptyObject, jsonEmptyString, jsonFalse, jsonNull, jsonSingletonArray, jsonSingletonObject, jsonTrue, jsonZero, stringify, toArray, toBoolean, toNull, toNumber, toObject, toString)
import Data.Argonaut.Decode (class DecodeJson, decodeJson, defaultField, defaultFieldDeprecated, getField, getFieldDeprecated, getFieldOptional, getFieldOptional', getFieldOptionalDeprecated, (.!=), (.:), (.:!), (.:?), (.?), (.?=), (.??))
import Data.Argonaut.Decode (class DecodeJson, JsonDecodeError(..), decodeJson, defaultField, getField, getFieldOptional, getFieldOptional', parseJson, printJsonDecodeError, (.!=), (.:), (.:!), (.:?))
import Data.Argonaut.Encode (class EncodeJson, assoc, assocOptional, encodeJson, extend, extendOptional, (:=), (:=?), (~>), (~>?))
import Data.Argonaut.JCursor (JCursor(..), JsonPrim(..), cursorGet, cursorSet, downField, downIndex, fail, fromPrims, inferEmpty, insideOut, primBool, primNull, primNum, primStr, primToJson, print, runJsonPrim, toPrims)
import Data.Argonaut.JCursor (JCursor(..), JsonPrim(..), cursorGet, cursorSet, downField, downIndex, fromPrims, inferEmpty, insideOut, primBool, primNull, primNum, primStr, primToJson, print, runJsonPrim, toPrims)
import Data.Argonaut.Parser (jsonParser)
import Data.Argonaut.Prisms (_Array, _Boolean, _Null, _Number, _Object, _String)
import Data.Argonaut.Traversals (_JsonArray, _JsonBoolean, _JsonNull, _JsonNumber, _JsonObject, _JsonString)

0 comments on commit 2b81ce1

Please sign in to comment.