Skip to content

Add Either and Maybe de/encode instances#57

Open
csicar wants to merge 3 commits into
paf31:masterfrom
csicar:master
Open

Add Either and Maybe de/encode instances#57
csicar wants to merge 3 commits into
paf31:masterfrom
csicar:master

Conversation

@csicar

@csicar csicar commented Sep 5, 2020

Copy link
Copy Markdown

This PR adds Encode and Decode instances for Either and Maybe and Set #5

The encodings are:

Left 1 <=> {"Left": 1}

Tuple 1 2 <=> [1, 2]

fromFoldable [1, 2, 3] <=> [1, 2, 3]

Decoding [1, 1, 2, 3] as a Set will fail with an error, because of the duplicate element

@paulyoung

Copy link
Copy Markdown

Will this address the following issues?

https://try.purescript.org/?gist=7e51897c612c1ff13a6f1aad7b71e5b4

@paulyoung

Copy link
Copy Markdown

Actually, I think this would: purescript-deprecated/purescript-generics-rep#34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants