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 consDeepStrictThe 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 = undefinedSomething 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.