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

with aeson 2.2.3.0 version I get compliation error #73

Closed
Miezhiko opened this issue Oct 3, 2024 · 0 comments · Fixed by #74
Closed

with aeson 2.2.3.0 version I get compliation error #73

Miezhiko opened this issue Oct 3, 2024 · 0 comments · Fixed by #74

Comments

@Miezhiko
Copy link
Contributor

Miezhiko commented Oct 3, 2024

(.?=) :: (Aeson.ToJSON v, Aeson.KeyValue e kv) => Aeson.Key -> Maybe v -> Maybe kv
k .?= Just v = Just (k Aeson..= v)
_ .?= Nothing = Nothing

(.=) :: (Aeson.ToJSON v, Aeson.KeyValue e kv) => Aeson.Key -> v -> Maybe kv
k .= v = Just (k Aeson..= v)

class CalamityToJSON' a where
  toPairs :: Aeson.KeyValue kv => a -> [Maybe kv]

• Expecting one more argument to ‘Aeson.KeyValue kv’
Expected a constraint,
but ‘Aeson.KeyValue kv’ has kind
‘* -> Constraint’
• In the type signature:
toPairs :: Aeson.KeyValue kv => a -> [Maybe kv]
In the class declaration for ‘CalamityToJSON'’
|
87 | toPairs :: Aeson.KeyValue kv => a -> [Maybe kv]
| ^^^^^^^^^^^^^^^^^

https://github.com/simmsb/calamity/blob/master/calamity/Calamity/Internal/Utils.hs#L186

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 a pull request may close this issue.

1 participant