Skip to content

Conversation

@anpryl
Copy link

@anpryl anpryl commented Feb 9, 2026

Summary

This PR adds compatibility with GHC 9.6+ and aeson 2.2+ to the socket-io package.

GHC 9.6+ fundep fix

GHC 9.6+ is stricter about functional dependency checking. The combination of:

  • class OnArgs a r | a -> r
  • instance OnArgs a a (generic base case)
  • constraint OnArgs f (EventHandler a) in the on signature

...causes GHC 9.6+ to reject the code because the fundep + base instance forces f ~ EventHandler a, which is too restrictive.

Fix: Add AllowAmbiguousTypes and replace the generic base instance with an EventHandler-specific instance to avoid the fundep conflict.

aeson 2.2 migration

aeson 2.2 moved the json attoparsec parser to the attoparsec-aeson package. This PR adds the attoparsec-aeson dependency and imports from Data.Aeson.Parser instead of Data.Aeson.

🤖 Generated with Claude Code

anpryl and others added 2 commits February 9, 2026 19:52
- Add AllowAmbiguousTypes pragma to SocketIO.hs
- Replace generic OnArgs base instance with EventHandler-specific
  instance to satisfy GHC 9.6+ stricter fundep checking
- Add attoparsec-aeson dependency and import Data.Aeson.Parser
  for the json parser (moved from Data.Aeson in aeson 2.2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update upper bounds in engine-io.cabal and socket-io.cabal to support
GHC 9.8 (base 4.19, text 2.1, mtl 2.3, transformers 0.6) and
aeson 2.2.x.
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.

1 participant