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

Use StrictData #147

Merged
merged 3 commits into from
Jan 12, 2025
Merged

Use StrictData #147

merged 3 commits into from
Jan 12, 2025

Conversation

srid
Copy link
Owner

@srid srid commented Dec 17, 2024

Repro for kowainik/stan#392

Run this command to get the path to the stan report,

echo $(nix build --print-out-paths)/stan.html

Despite using StrictData in both the cabal file and the module (Main.hs), notice that stan will fail to recoginze it:

image

@shivaraj-bh
Copy link

From nix log /nix/store/0j3nf2vqzb64zcv94xz32hki506nfz3q-haskell-template-0.1.0.0.drv:

image

It could be because stan isn’t aware that we have added StrictData in the .cabal file.

@shivaraj-bh
Copy link

shivaraj-bh commented Dec 18, 2024

image

Even after providing the .cabal file, stan fails to recognize StrictData.

Edit: Ah, the problem seems to be Extensions from .cabal: Unable to extract extensions

@srid
Copy link
Owner Author

srid commented Dec 18, 2024

Yes, you can see the "Unable to extract extensions" error in the original screenshot I posted above. However, this still doesn't explain why it can't recoginze the explicit language pragma I added in Main.hs.

@shivaraj-bh
Copy link

Yes, you can see the "Unable to extract extensions" error in the original screenshot I posted above. However, this still doesn't explain why it can't recoginze the explicit language pragma I added in Main.hs.

Only seems to happen when we are not running stan from the project root.

Both adding StrictData to .cabal and as an explicit language pragma in Main.hs are detected after using the fix from srid/haskell-flake#386.

Run to get stan report with the above PR: echo $(nix build github:srid/haskell-template/stan-strict-data --override-input haskell-flake github:shivaraj-bh/haskell-flake/stan --print-out-paths)/stan.html

image

@srid
Copy link
Owner Author

srid commented Dec 20, 2024

Perfect!

@srid srid marked this pull request as ready for review December 20, 2024 14:05
@srid srid merged commit 063b416 into master Jan 12, 2025
2 checks passed
@srid srid deleted the stan-strict-data branch January 12, 2025 01:02
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