-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactors #8
base: main
Are you sure you want to change the base?
Refactors #8
Conversation
What is the bug you are trying to fix? Could you make an issue? And I'll try to help if I can. I'm not sure about some of these refractors. Lets discuss before merging |
RRBVector isn't being assessed as deepstrict correctly. We can fake this working by just adding it to the golden list and marking its parameter as Strict. The reason why it isn't being assessed correctly is because consDeepStrict <- traverse isConDeepStrict (TH.datatypeCons updatedDt)
pure $ mconcat consDeepStrict The refactors were so that the code is more easily understandable for me. I also think they make it clearer, since |
Ah I see! You are right that's a bug. I think only I'll take a proper look at this one later |
Can do. I fear that |
Yes that's right. For any lifted type both can have thunks, for an unlifted type they are ok. So it might be good to check that eg |
I don't think there's a way currently to say "If unlifted, deepstrict; else, lazy". would have to add to the |
|
Yeah mutable variants will be the same.
Yes you'll have to add an |
If a field's type is Unlifted, then surely it is deepstrict already? |
Being unlifted is a top-level thing (https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/primitives.html#unlifted-datatypes), eg, data UBox a :: UnliftedType where
UBox :: a -> UBox a
x = UBox undefined
-- while the following is not allowed
-- y :: UBox Int
-- y = undefined Something being unlifted means that it cannot be a thunk, but it can still contain fields that can be thunks. |
…he context. this neatens up code because we don't have to pass around the list as much, instead modifying the reader when we need to
45ae30e
to
0295e9f
Compare
No description provided.