• code Haskell
    1.hs:46:44: error:
        • Could not deduce: q ~ (a0 -> q0)
          from the context: Cxq t q
            bound by the type signature for:
                       foo :: Cxq t q => V t -> [Def] -> [Val] -> q -> Exq t q
            at 1.hs:44:1-55
          or from: t ~ 'S a
            bound by a pattern with constructor:
                       :. :: forall (a :: S). String -> V a -> V ('S a),
                     in an equation for ‘foo’
            at 1.hs:46:6-12
          ‘q’ is a rigid type variable bound by
            the type signature for:
              foo :: forall (t :: S) q.
                     Cxq t q =>
                     V t -> [Def] -> [Val] -> q -> Exq t q
            at 1.hs:44:8
        • In the second argument of ‘(.)’, namely ‘q’
          In the first argument of ‘(=<<)’, namely ‘foo ss df vals . q’
          In the expression:
            foo ss df vals . q =<< fs =<< getValue s defs vals
        • Relevant bindings include
            q :: q (bound at 1.hs:46:23)
            foo :: V t -> [Def] -> [Val] -> q -> Exq t q (bound at 1.hs:45:1)
    
    
    проблема т.к. у меня kind q зависит от значения (и типа) V t, если это V Z то kind *,  если V (S t) то * -> *.
    это как-нить вообще обходится?

Replies (4)