T14846.hs:38:8: error: • Couldn't match type ‘ríki’ with ‘Hom riki’ ‘ríki’ is a rigid type variable bound by the type signature for: i :: forall {k5} {k6} {cls3 :: k6 -> Constraint} (xx :: k5) (a :: Struct cls3) (ríki :: Struct cls3 -> Struct cls3 -> *). StructI xx a => ríki a a at T14846.hs:38:8-48 Expected type: ríki a a Actual type: Hom riki a a • When checking that instance signature for ‘i’ is more general than its signature in the class Instance sig: forall {k1} {k2} {cls :: k2 -> Constraint} (xx :: k1) (a :: Struct cls). StructI xx a => Hom riki a a Class sig: forall {k1} {k2} {cls :: k2 -> Constraint} (xx :: k1) (a :: Struct cls) (ríki :: Struct cls -> Struct cls -> *). StructI xx a => ríki a a In the instance declaration for ‘Category (Hom riki)’ T14846.hs:39:12: error: • Could not deduce (StructI xx1 structured0) arising from a use of ‘struct’ from the context: Category riki bound by the instance declaration at T14846.hs:37:10-65 or from: StructI xx a bound by the type signature for: i :: forall {k5} {k6} {cls3 :: k6 -> Constraint} (xx :: k5) (a :: Struct cls3). StructI xx a => Hom riki a a at T14846.hs:38:8-48 The type variables ‘xx1’, ‘structured0’ are ambiguous Relevant bindings include i :: Hom riki a a (bound at T14846.hs:39:3) These potential instance exist: instance forall k (xx :: k) (cls :: k -> Constraint) (structured :: Struct cls). (Structured xx cls ~ structured, cls xx) => StructI xx structured -- Defined at T14846.hs:28:10 • In the expression: struct :: AStruct (Structured a cls) In the expression: case struct :: AStruct (Structured a cls) of In an equation for ‘i’: i = case struct :: AStruct (Structured a cls) of T14846.hs:39:44: error: • Expected kind ‘Struct cls3 -> Constraint’, but ‘cls’ has kind ‘k4 -> Constraint’ • In the second argument of ‘Structured’, namely ‘cls’ In the first argument of ‘AStruct’, namely ‘(Structured a cls)’ In an expression type signature: AStruct (Structured a cls) • Relevant bindings include i :: Hom riki a a (bound at T14846.hs:39:3)