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

Enable StrictData wherever our tests don't fail #4003

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

balacij
Copy link
Collaborator

@balacij balacij commented Feb 6, 2025

Contributes to #3710, where non-strict data is a very common warning noted by stan.
Contributes to #2873, where we need StrictData to build maps of chunks with 'sane checks on insertion'.

I also manually set the language specification to Haskell2010. That's the default that hpack uses, but I think that being explicit is good here. Aside: I'm also okay with upgrading this to GHC2021 or the more recent 2024 spec.

@balacij
Copy link
Collaborator Author

balacij commented Feb 6, 2025

We were convinced that strict data was the right way to go, right? In light of #4006, there might be a larger discussion to be had.

Copy link
Owner

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

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

Just one oddity. I'm kind of surprised this just works, given that we know there are cycles!

code/drasil-utils/package.yaml Outdated Show resolved Hide resolved
@balacij
Copy link
Collaborator Author

balacij commented Feb 6, 2025

Yep, all the cycles involve data types defined in drasil-(lang|database|code).

One involving drasil-code in particular has me dumbfounded -- it causes a hard type error to be thrown from GOOL, but I haven't found the unused problematic expression yet.

@JacquesCarette
Copy link
Owner

What puzzles me is that this passes the tests?

@balacij
Copy link
Collaborator Author

balacij commented Feb 6, 2025

Yes, all usage of data types from these packages can be strictly used, it seems. The real problematic area is drasil-database which would force evaluating all thunks in our chunks. That would be a mess. These ones are all guarded by laziness that handle the reference loops nicely.

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