Hi everyone,

Today I'm trying to merge the latest HEAD into my work on the explicit
forall proposal, and I'm running into a problem I'd like help with. The
changes that are affecting me seem to come from the latest Trees that Grow
checkins.

I had added a field to FamEqn, namely feqn_bndrs:

data FamEqn pass pats rhs
  = FamEqn
       { feqn_tycon  :: Located (IdP pass)
       , feqn_bndrs  :: Maybe [LHsTyVarBndr pass]
                        -- ^ Explicit user-provided binders
       , feqn_pats   :: pats
       , feqn_fixity :: LexicalFixity -- ^ Fixity used in the declaration
       , feqn_rhs    :: rhs
       }
    -- ^
    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual',
    --           'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot'

    -- For details on above see note [Api annotations] in ApiAnnotation
deriving instance (DataId pass, Data pats, Data rhs)
                => Data (FamEqn pass pats rhs)

When I try to compile now, I get the following errors that I cannot
understand.  I assume I need to do something else, but I'm not sure what it
is, so I'd appreciate any guidance.

compiler/hsSyn/HsDecls.hs:1441:1: error:
    • Could not deduce (Data (XValBinds pass pass),
                        Data (XXValBindsLR pass pass))
        arising from a use of ‘k’
      from the context: (DataId pass, Data pats, Data rhs)
        bound by the instance declaration
        at compiler/hsSyn/HsDecls.hs:(1441,1)-(1442,46)
    • In the first argument of ‘k’, namely ‘((z FamEqn `k` a1) `k` a2)’
      In the first argument of ‘k’, namely
        ‘(((z FamEqn `k` a1) `k` a2) `k` a3)’
      In the first argument of ‘k’, namely
        ‘((((z FamEqn `k` a1) `k` a2) `k` a3) `k` a4)’
      When typechecking the code for ‘gfoldl’
        in a derived instance for ‘Data (FamEqn pass pats rhs)’:
        To see the code I am typechecking, use -ddump-deriv
     |
1441 | deriving instance (DataId pass, Data pats, Data rhs)
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

compiler/hsSyn/HsDecls.hs:1441:1: error:
    • Could not deduce (Data (XValBinds pass pass),
                        Data (XXValBindsLR pass pass))
        arising from a use of ‘k’
      from the context: (DataId pass, Data pats, Data rhs)
        bound by the instance declaration
        at compiler/hsSyn/HsDecls.hs:(1441,1)-(1442,46)
    • In the first argument of ‘k’, namely ‘(k (k (z FamEqn)))’
      In the first argument of ‘k’, namely ‘(k (k (k (z FamEqn))))’
      In the first argument of ‘k’, namely ‘(k (k (k (k (z FamEqn)))))’
      When typechecking the code for ‘gunfold’
        in a derived instance for ‘Data (FamEqn pass pats rhs)’:
        To see the code I am typechecking, use -ddump-deriv
     |
1441 | deriving instance (DataId pass, Data pats, Data rhs)
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

John
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to