<div dir="ltr"><div><div>Change the deriving to<br><br><font face="monospace, monospace">deriving instance (DataIdLR pass pass, Data pats, Data rhs)<br><br></font></div><font face="monospace, monospace">Unfortunately the LR stuff bleeds through at the moment.<br><br></font></div><font face="monospace, monospace">Alan<br></font></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 November 2017 at 23:12, John Leo <span dir="ltr"><<a href="mailto:leo@halfaya.org" target="_blank">leo@halfaya.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>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.</div><div><br></div><div>I had added a field to FamEqn, namely feqn_bndrs:</div><div><br></div><div><div><font face="monospace, monospace">data FamEqn pass pats rhs</font></div><div><font face="monospace, monospace"> = FamEqn</font></div><div><font face="monospace, monospace"> { feqn_tycon :: Located (IdP pass)</font></div><div><font face="monospace, monospace"> , feqn_bndrs :: Maybe [LHsTyVarBndr pass]</font></div><div><font face="monospace, monospace"> -- ^ Explicit user-provided binders</font></div><div><font face="monospace, monospace"> , feqn_pats :: pats</font></div><div><font face="monospace, monospace"> , feqn_fixity :: LexicalFixity -- ^ Fixity used in the declaration</font></div><div><font face="monospace, monospace"> , feqn_rhs :: rhs</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace"> -- ^</font></div><div><font face="monospace, monospace"> -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual',</font></div><div><font face="monospace, monospace"> -- 'ApiAnnotation.AnnForall','<wbr>ApiAnnotation.AnnDot'</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> -- For details on above see note [Api annotations] in ApiAnnotation</font></div><div><font face="monospace, monospace">deriving instance (DataId pass, Data pats, Data rhs)</font></div><div><font face="monospace, monospace"> => Data (FamEqn pass pats rhs)</font></div></div><div><br></div><div>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.</div><div><br></div><div><div><font face="monospace, monospace">compiler/hsSyn/HsDecls.hs:<wbr>1441:1: error:</font></div><div><font face="monospace, monospace"> • Could not deduce (Data (XValBinds pass pass),</font></div><div><font face="monospace, monospace"> Data (XXValBindsLR pass pass))</font></div><div><font face="monospace, monospace"> arising from a use of ‘k’</font></div><div><font face="monospace, monospace"> from the context: (DataId pass, Data pats, Data rhs)</font></div><div><font face="monospace, monospace"> bound by the instance declaration</font></div><div><font face="monospace, monospace"> at compiler/hsSyn/HsDecls.hs:(<wbr>1441,1)-(1442,46)</font></div><div><font face="monospace, monospace"> • In the first argument of ‘k’, namely ‘((z FamEqn `k` a1) `k` a2)’</font></div><div><font face="monospace, monospace"> In the first argument of ‘k’, namely</font></div><div><font face="monospace, monospace"> ‘(((z FamEqn `k` a1) `k` a2) `k` a3)’</font></div><div><font face="monospace, monospace"> In the first argument of ‘k’, namely</font></div><div><font face="monospace, monospace"> ‘((((z FamEqn `k` a1) `k` a2) `k` a3) `k` a4)’</font></div><div><font face="monospace, monospace"> When typechecking the code for ‘gfoldl’</font></div><div><font face="monospace, monospace"> in a derived instance for ‘Data (FamEqn pass pats rhs)’:</font></div><div><font face="monospace, monospace"> To see the code I am typechecking, use -ddump-deriv</font></div><div><font face="monospace, monospace"> |</font></div><div><font face="monospace, monospace">1441 | deriving instance (DataId pass, Data pats, Data rhs)</font></div><div><font face="monospace, monospace"> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<wbr>^^^^^^^^^^^^^^^^^^^^^^...</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">compiler/hsSyn/HsDecls.hs:<wbr>1441:1: error:</font></div><div><font face="monospace, monospace"> • Could not deduce (Data (XValBinds pass pass),</font></div><div><font face="monospace, monospace"> Data (XXValBindsLR pass pass))</font></div><div><font face="monospace, monospace"> arising from a use of ‘k’</font></div><div><font face="monospace, monospace"> from the context: (DataId pass, Data pats, Data rhs)</font></div><div><font face="monospace, monospace"> bound by the instance declaration</font></div><div><font face="monospace, monospace"> at compiler/hsSyn/HsDecls.hs:(<wbr>1441,1)-(1442,46)</font></div><div><font face="monospace, monospace"> • In the first argument of ‘k’, namely ‘(k (k (z FamEqn)))’</font></div><div><font face="monospace, monospace"> In the first argument of ‘k’, namely ‘(k (k (k (z FamEqn))))’</font></div><div><font face="monospace, monospace"> In the first argument of ‘k’, namely ‘(k (k (k (k (z FamEqn)))))’</font></div><div><font face="monospace, monospace"> When typechecking the code for ‘gunfold’</font></div><div><font face="monospace, monospace"> in a derived instance for ‘Data (FamEqn pass pats rhs)’:</font></div><div><font face="monospace, monospace"> To see the code I am typechecking, use -ddump-deriv</font></div><div><font face="monospace, monospace"> |</font></div><div><font face="monospace, monospace">1441 | deriving instance (DataId pass, Data pats, Data rhs)</font></div><div><font face="monospace, monospace"> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<wbr>^^^^^^^^^^^^^^^^^^^^^^</font></div></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>John</div><div><br></div></font></span></div>
</blockquote></div><br></div>