We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ac7f7 commit ae318bcCopy full SHA for ae318bc
src/Foreign/Generic/Class.purs
@@ -212,8 +212,8 @@ instance maybeEncode :: Encode a => Encode (Maybe a) where
212
213
instance eitherEncode :: (Encode a, Encode b) => Encode (Either a b) where
214
encode = case _ of
215
- Left value -> unsafeToForeign $ Record.insert (SProxy:: SProxy "Left") (encode value) {}
216
- Right value -> unsafeToForeign $ Record.insert (SProxy:: SProxy "Right") (encode value) {}
+ Left value -> unsafeToForeign $ {"Left": (encode value)}
+ Right value -> unsafeToForeign $ { "Right": (encode value) }
217
218
instance tupleEncode :: (Encode a, Encode b) => Encode (Tuple a b) where
219
encode (Tuple a b) = encode [encode a, encode b]
0 commit comments