{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiajy7iln6bapxpygs2dpuervduowtwa6ovdgsq3laodeixni3ms4i",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mowhvcrt74e2"
  },
  "path": "/t/error-ghc-91510-illegal-polymorphic-type/14304#post_10",
  "publishedAt": "2026-06-23T02:23:19.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "@Leary"
  ],
  "textContent": "OMG, I solved it!\n\n\n    type C0 :: k -> Constraint\n    class C0 x\n    instance C0 x\n\n    type CCompose :: (k -> Constraint) -> (j -> k) -> Constraint\n    class (forall x. (c (f x))) => CCompose c f\n\n    type Category :: (k -> k -> Type) -> Constraint\n    class Category cat where\n      type Objects cat :: k -> Constraint -- changed\n      id :: (Objects cat x) => cat x x\n      (.) ::\n        (Objects cat x, Objects cat y, Objects cat z) =>\n        cat y z -> cat x y -> cat x z\n\n    instance (Category c, Category d) => Category (Transform c d) where\n      type Objects (Transform c d) = CCompose (Objects d) -- nice!\n      id :: (Objects (Transform c d) f) => Transform c d f f\n      id = Transform id\n      (.) ::\n        ( Objects (Transform c d) f\n        , Objects (Transform c d) g\n        , Objects (Transform c d) h\n        ) =>\n        Transform c d g h -> Transform c d f g -> Transform c d f h\n      Transform g_h . Transform f_g = Transform (g_h . f_g)\n\n\nCompiles! Thanks for pointing me in the right direction @Leary!",
  "title": "Error GHC-91510: illegal polymorphic type"
}