Closed peterbecich closed 3 years ago
This PR adds the unwrapSingleArguments switch: https://github.com/eskimor/purescript-bridge/blob/87d583f337ebf684a2b51ae0df3920163bd0870c/src/Language/PureScript/Bridge/CodeGenSwitches.hs#L26-L30
unwrapSingleArguments
, corresponding to: https://github.com/paf31/purescript-foreign-generic/blob/46f09996bd54efc146bc1725783789dbac7d6a5b/src/Foreign/Generic/Class.purs#L37-L42
It appears in the generated Purescript: https://github.com/eskimor/purescript-bridge/blob/87d583f337ebf684a2b51ae0df3920163bd0870c/example/src/Types.purs#L23-L26
Some improvements are made to the example. An error is printed if decoding fails.
Thanks!
This PR adds the
unwrapSingleArguments
switch: https://github.com/eskimor/purescript-bridge/blob/87d583f337ebf684a2b51ae0df3920163bd0870c/src/Language/PureScript/Bridge/CodeGenSwitches.hs#L26-L30, corresponding to: https://github.com/paf31/purescript-foreign-generic/blob/46f09996bd54efc146bc1725783789dbac7d6a5b/src/Foreign/Generic/Class.purs#L37-L42
It appears in the generated Purescript: https://github.com/eskimor/purescript-bridge/blob/87d583f337ebf684a2b51ae0df3920163bd0870c/example/src/Types.purs#L23-L26
Some improvements are made to the example. An error is printed if decoding fails.