Closed Profpatsch closed 2 years ago
Beware that there is a regression in the Variant tests:
Failures:
test/Spec.hs:151:15:
1) Variants parses from JSON
superrecord-test: Prelude.undefined
CallStack (from HasCallStack):
error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err
undefined, called at src/SuperRecord/Variant.hs:126:26 in superrecord-0.5.1.0-inplace:SuperRecord.Variant
We are not using Variants, so I’m ignoring that for now.
Oh, I also think the second commit is not valid, simply replacing every *
with Type
will make Has
not work anymore:
Rec.Has "firstDay" req Time.Day
leads to the error
• Expected kind ‘[*]’,
but ‘"firstDay"’ has kind ‘ghc-prim-0.7.0:GHC.Types.Symbol’
…
So I’m guessing it is less generic than *
, I guess it has to be kind-polymorphic to work.
Nvm, apparently the Has
constraint flipped the second and third argument, which is why I got this error.
Superseded by #35
This is a small update I made so we can use superrecord with GHC 9 and aeson 2.
See commit messages, might not be up to standard with this project’s guidelines (e.g. CI needs to be adjusted I guess, and older GHCs might not like the Type change).