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

Add poly support #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add poly support #2

wants to merge 1 commit into from

Conversation

ProgramingIsTheFuture
Copy link
Owner

@ProgramingIsTheFuture ProgramingIsTheFuture commented Oct 6, 2024

For polymorphic types:

type 'a t = {
  my_field : 'a;
}
val default: 'a -> unit -> 'a t

I want to avoid adding a new parameter if the type inside is 'a option (the default is None).

I want to improve the following

type my_type = any

type eg =
  | Some of my_type

What the ppx_default does, in this case, is calling the default_my_type ().
Need to fix the case of that type being polymorphic.

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.

1 participant