Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support type aliases #17

Open
thangngoc89 opened this issue Jul 19, 2019 · 1 comment
Open

Support type aliases #17

thangngoc89 opened this issue Jul 19, 2019 · 1 comment

Comments

@thangngoc89
Copy link

So I was trying to decode a result type like this:

type message = Belt.Result.t(list(parse_result), Error.t);

And I got this error:

The value t_encode can't be found in Belt.Result

With deriving plugins, I'd normally create a type alias like this:

[@decco]
type result('a, 'b) = Belt.Result.t('a, 'b) = | Ok('a) | Error('b);

But now the error is still the same.

@ryb73
Copy link
Member

ryb73 commented Aug 26, 2019

Thanks for the request. I haven't gotten a chance to look into this yet, but regarding the specific case you mentioned, support for Belt.Result.t was recently added in #19.

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

No branches or pull requests

2 participants