Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Foreign/Generic/Class.purs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class GenericCountArgs a where
countArgs :: Proxy a -> Either a Int

instance genericDecodeNoConstructors :: GenericDecode NoConstructors where
decodeOpts opts _ = fail (ForeignError "No constructors")
decodeOpts _ _ = fail (ForeignError "No constructors")

instance genericEncodeNoConstructors :: GenericEncode NoConstructors where
encodeOpts opts a = encodeOpts opts a
Expand All @@ -289,7 +289,7 @@ instance genericDecodeConstructor
then Constructor <$> readArguments f
else case opts.sumEncoding of
TaggedObject { tagFieldName, contentsFieldName, constructorTagTransform } -> do
tag <- mapExcept (lmap (map (ErrorAtProperty tagFieldName))) do
_ <- mapExcept (lmap (map (ErrorAtProperty tagFieldName))) do
tag <- index f tagFieldName >>= readString
let expected = constructorTagTransform ctorName
unless (tag == expected) $
Expand Down