<div dir="ltr">Thanks for spotting this. I&#39;ve filed <a href="https://github.com/agda/agda/issues/1847">https://github.com/agda/agda/issues/1847</a>. The problem is that record parameters are turned into hidden parameters inside the record definition. This is the right thing to do for explicit arguments, but instance arguments should stay instance.<div><br></div><div>/ Ulf</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 3:18 AM,  <span dir="ltr">&lt;<a href="mailto:darais@cs.umd.edu" target="_blank">darais@cs.umd.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andrés and the Agda team,<br>
<br>
I have a small use of typeclasses that no longer typechecks with Agda<br>
2.5.0.20160213.<br>
<br>
It appears typeclass instances as record parameters are no longer in scope for<br>
definitions local to the record. In the example below, the `ADD` instance is<br>
not found by typeclass resolution in the definition of `neg`. This example<br>
typchecks just fine with Agda 2.4.2.5.<br>
<br>
Thanks,<br>
David Darais<br>
<br>
record Additive {ℓ} (A : Set ℓ) : Set ℓ where<br>
  field<br>
    zero : A<br>
    _+_ : A → A → A<br>
open Additive {{...}} public<br>
<br>
record Subtractive {ℓ} (A : Set ℓ) {{ADD : Additive A}} : Set ℓ where<br>
  field<br>
    _-_ : A → A → A<br>
  neg : A → A<br>
  neg x = zero - x<br>
open Subtractive {{...}} public<br>
<br>
&gt; Date: Sat, 13 Feb 2016 13:20:41 -0500<br>
&gt; From: Andrés Sicard-Ramírez &lt;<a href="mailto:asr@eafit.edu.co">asr@eafit.edu.co</a>&gt;<br>
<span class="im HOEnZb">&gt;<br>
&gt; Dear all,<br>
&gt;<br>
&gt; The Agda Team is very pleased to announce a release candidate of Agda<br>
&gt; 2.5.1 available at<br>
&gt;<br>
&gt;  <a href="http://www1.eafit.edu.co/asr/tmp/Agda-2.5.0.20160213.tar.gz" rel="noreferrer" target="_blank">http://www1.eafit.edu.co/asr/tmp/Agda-2.5.0.20160213.tar.gz</a><br>
&gt;<br>
&gt;<br>
</span><span class="im HOEnZb">&gt; GHC supported versions<br>
&gt; ===============<br>
&gt;<br>
&gt; This RC has been tested with GHC 7.6.3, 7.8.4 and 7.10.3.<br>
&gt;<br>
&gt;<br>
&gt; Installation<br>
&gt; =======<br>
&gt;<br>
&gt; This RC can be installed using the following instructions:<br>
&gt;<br>
</span><span class="im HOEnZb">&gt;  $ tar xzf Agda-2.5.0.20160213.tar.gz<br>
&gt;  $ cd Agda-2.5.0.20160213.tar.gz<br>
&gt;  $ cabal install<br>
&gt;<br>
&gt;<br>
</span><div class="HOEnZb"><div class="h5">&gt; Standard library<br>
&gt; ==========<br>
&gt;<br>
&gt; For the time being, a version (the master branch) of the standard<br>
&gt; library compatible with this RC is available via<br>
&gt;<br>
&gt;  $ git clone <a href="https://github.com/agda/agda-stdlib.git" rel="noreferrer" target="_blank">https://github.com/agda/agda-stdlib.git</a><br>
&gt;<br>
&gt;<br>
&gt; What is new?<br>
&gt; ========<br>
&gt;<br>
&gt; The RC includes various new features and changes:<br>
&gt;<br>
&gt; * A new library management<br>
&gt;<br>
&gt; * The reflection framework has received a massive overhaul.<br>
&gt;<br>
&gt; * Instance search performance has been improved.<br>
&gt;<br>
&gt; * A new backend targeting the Utrecht Haskell Compiler (UHC) is available.<br>
&gt;<br>
&gt; * The new agda-ghc-names tool for handling profiling files generate<br>
&gt; from MAlonzo-compiled code.<br>
&gt;<br>
&gt; There also are new options, pragmas and built-ins, and changes related<br>
&gt; to modules, records, operators syntax, literals, instance search, type<br>
&gt; checking, compiler/LaTeX/HTML backends and the Emacs mode. More<br>
&gt; information about the changes included in this RC can be found in<br>
&gt;<br>
&gt;  <a href="https://raw.githubusercontent.com/agda/agda/2.5.0.20160213/CHANGELOG" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/agda/agda/2.5.0.20160213/CHANGELOG</a><br>
&gt;<br>
&gt;<br>
&gt; Incompatibilities<br>
&gt; ==========<br>
&gt;<br>
&gt; This RC is not full compatible with Agda 2.4.2.5. The main<br>
&gt; incompatibilities are:<br>
&gt;<br>
&gt; * A long-standing operator fixity bug has been fixed. As a consequence<br>
&gt; some programs that used to parse no longer do.<br>
&gt;<br>
&gt; * Emacs mode: Removed the agda-include-dirs customization parameter.<br>
&gt;<br>
&gt; * Removed pragma {-# ETA R #-}<br>
&gt;<br>
&gt; More information about the incompatibilities included in this RC can<br>
&gt; be found in the above CHANGELOG.<br>
&gt;<br>
&gt;<br>
&gt; Fixed issues<br>
&gt; =======<br>
&gt;<br>
&gt; Approximately 90 bugs/enhancements were fixed/closed, some of them<br>
&gt; long-standing ones:<br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/480" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/480</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/520" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/520</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/576" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/576</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/727" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/727</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/896" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/896</a><br>
&gt;<br>
&gt;<br>
&gt; Know regressions<br>
&gt; ===========<br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/1605" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/1605</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/1770" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/1770</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/1775" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/1775</a><br>
&gt;<br>
&gt; * <a href="https://github.com/agda/agda/issues/1821" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues/1821</a><br>
&gt;<br>
&gt;<br>
&gt; Know issues<br>
&gt; ========<br>
&gt;<br>
&gt;  <a href="https://github.com/agda/agda/issues?utf8=%E2%9C%93&amp;q=is%3Aopen+milestone%3A2.5.1+label%3Abug+" rel="noreferrer" target="_blank">https://github.com/agda/agda/issues?utf8=%E2%9C%93&amp;q=is%3Aopen+milestone%3A2.5.1+label%3Abug+</a><br>
&gt;<br>
&gt;<br>
&gt; Enjoy this RC and please test as much as possible.<br>
&gt;<br>
&gt; --<br>
&gt; Andrés, on behalf of the Agda Team<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Agda mailing list<br>
<a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda" rel="noreferrer" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
</div></div></blockquote></div><br></div>