Skip to content

Support sum types in bidirectional conversion #54

@chshersh

Description

@chshersh

Let's say, we have a type like this:

data Either l r = Left l | Right r

It should be possible to write bidirectional converter for such type type. Perfectly with the help of Alternative type class. I think in TOML this should look like this:

foo.Left = 42
bar.Right = true

Specifying both constructors should result in parsing error.

Metadata

Metadata

Assignees

Labels

codecConversion between TOML and custom user data types

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions