File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Prelude
13
13
import Data.Argonaut as Data.Argonaut
14
14
import Data.Codec.Argonaut as Data.Codec.Argonaut
15
15
import Data.Either (Either (..))
16
+ import Data.Either as Data.Either
16
17
import Data.Maybe (Maybe (..))
17
18
import Data.Symbol (SProxy (..))
18
19
import Data.Traversable as Data.Traversable
@@ -102,9 +103,7 @@ fromArgonaut ::
102
103
fromArgonaut = Data.Codec.Argonaut .prismaticCodec from to Data.Codec.Argonaut .json
103
104
where
104
105
from :: Data.Argonaut.Json -> Maybe a
105
- from json = case Data.Argonaut .decodeJson json of
106
- Left _ -> Nothing
107
- Right x -> Just x
106
+ from json = Data.Either .hush (Data.Argonaut .decodeJson json)
108
107
109
108
to :: a -> Data.Argonaut.Json
110
109
to = Data.Argonaut .encodeJson
You can’t perform that action at this time.
0 commit comments