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

--ghc-strict-data and --ghc-strict #5431

Closed
nad opened this issue Jun 2, 2021 · 0 comments
Closed

--ghc-strict-data and --ghc-strict #5431

nad opened this issue Jun 2, 2021 · 0 comments
Assignees
Labels
backend: ghc Haskell code generation backend ("MAlonzo") type: enhancement Issues and pull requests about possible improvements
Milestone

Comments

@nad
Copy link
Contributor

nad commented Jun 2, 2021

I've implemented two flags that make the GHC backend emit possibly more strict code:

  • --ghc-strict-data: Based on the GHC language extension StrictData. Makes most inductive constructors strict.
  • --ghc-strict: Based on the GHC language extension Strict. Makes the code mostly strict.

Are there any thoughts about this before I push the changes?

I'm not sure how useful these flags are:

  • They are activated for the entire program (backend options cannot be used in OPTIONS pragmas, and furthermore the translation to tree-less syntax depends on the evaluation strategy).
  • There is no way to specify that a particular constructor or function should be lazy.
  • If the goal is to create strict code, then perhaps one should target a different language.

However, I wanted to be able to test that --erased-cubical works correctly in a strict, functional setting.

@nad nad added type: enhancement Issues and pull requests about possible improvements backend: ghc Haskell code generation backend ("MAlonzo") labels Jun 2, 2021
@nad nad added this to the 2.6.3 milestone Jun 2, 2021
nad added a commit that referenced this issue Jun 2, 2021
nad added a commit that referenced this issue Jun 2, 2021
nad added a commit that referenced this issue Jun 2, 2021
nad added a commit that referenced this issue Jun 2, 2021
@nad nad self-assigned this Jun 3, 2021
nad added a commit that referenced this issue Jun 7, 2021
nad added a commit that referenced this issue Jun 7, 2021
@nad nad closed this as completed Jun 7, 2021
@andreasabel andreasabel modified the milestones: 2.6.3, 2.6.2.1 Aug 18, 2021
@andreasabel andreasabel mentioned this issue Aug 25, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: ghc Haskell code generation backend ("MAlonzo") type: enhancement Issues and pull requests about possible improvements
Projects
None yet
Development

No branches or pull requests

2 participants