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

Review the need for global vs local language extensions #413

Open
florentc opened this issue May 30, 2024 · 0 comments
Open

Review the need for global vs local language extensions #413

florentc opened this issue May 30, 2024 · 0 comments

Comments

@florentc
Copy link
Member

Languages extensions used to be declared in pragmas locally at the beginning of modules they were used in. They have recently all been set up globally at the package level (see in package.yaml) to avoid having huge repetitive preludes in haskell modules.

I am not convinced this is desirable because most extensions are only used in few modules (it is then difficult to picture which module depends on which), some modify the haskell concrete syntax, some modify type checking, and some may be controversial in the haskell community. I think there are risks of over-reliance on these extensions, unexpected behaviors in the future when we don't keep in mind all the enabled extensions, and it could reduce modularity and portability.

I think we should aim at a compromise.

We should consult with the community and determine a set of criteria to decide on which language extensions do deserve to be enabled globally. I would be in favor of going local when in doubt.

@florentc florentc changed the title Review the need for global vs local language extensions. Review the need for global vs local language extensions May 30, 2024
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

1 participant