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

Research unifying TypeRecursion and dataDec function w/ class constructor #65

Closed
mlhaufe opened this issue May 25, 2023 · 0 comments · Fixed by #66
Closed

Research unifying TypeRecursion and dataDec function w/ class constructor #65

mlhaufe opened this issue May 25, 2023 · 0 comments · Fixed by #66
Assignees
Milestone

Comments

@mlhaufe
Copy link
Owner

mlhaufe commented May 25, 2023

Currently data returns a function when parameterized:

const ListData = data((List, T) => ({
        Nil: {},
        Cons: { head: T, tail: List(T) }
    }));

List is also a TypeRecursion object and not the class constructor.

Given #64, it's worth looking into a way to return the class itself.

Additionally, the conversion to typescript (#28) should be easier if TypeRecursion can be replaced with the class itself (which implies the need for memoFix in the implementation)

@mlhaufe mlhaufe added this to the v0.13.0 milestone May 25, 2023
@mlhaufe mlhaufe self-assigned this May 25, 2023
@mlhaufe mlhaufe linked a pull request May 29, 2023 that will close this issue
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 a pull request may close this issue.

1 participant