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

More parameterization for functions not needing a specialized type parameter. #150

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

kquick
Copy link
Member

@kquick kquick commented Dec 8, 2024

Weakens type declarations to be more permissive where the stricter type isn't needed. This should not affect any existing uses, but permits a broader utilization of these functions where desireable.

@kquick kquick requested a review from RyanGlScott December 8, 2024 05:16
Copy link
Collaborator

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, but do make sure to advertise these changes in the changelog.

Comment on lines 483 to 487
isAlias :: Type' ident -> Bool
isAlias Alias{} = True
isAlias _ = False

isPrimTypeOf :: (PrimType -> Bool) -> Type -> Bool
isPrimTypeOf :: (PrimType -> Bool) -> Type' lab -> Bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code here is inconsistent about calling Type's type parameter ident or lab (and similarly with the code below). I think we should pick one convention and stick to it.

@kquick kquick merged commit ea0ad98 into master Dec 9, 2024
1 check passed
@kquick kquick deleted the dgb_1733634870-0 branch December 9, 2024 21:11
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