Skip to content

Commit 39840c7

Browse files
committed
PS-3032 Inline casing
Per review request.
1 parent 10e136e commit 39840c7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Lynx/List.purs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Prelude
1313
import Data.Argonaut as Data.Argonaut
1414
import Data.Codec.Argonaut as Data.Codec.Argonaut
1515
import Data.Either (Either(..))
16+
import Data.Either as Data.Either
1617
import Data.Maybe (Maybe(..))
1718
import Data.Symbol (SProxy(..))
1819
import Data.Traversable as Data.Traversable
@@ -102,9 +103,7 @@ fromArgonaut ::
102103
fromArgonaut = Data.Codec.Argonaut.prismaticCodec from to Data.Codec.Argonaut.json
103104
where
104105
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)
108107

109108
to :: a -> Data.Argonaut.Json
110109
to = Data.Argonaut.encodeJson

0 commit comments

Comments
 (0)