I actually started writing a &quot;model&quot; of repa in Agda (since the array shapes work so much more nicely when you have types that can fully represent them) that I eventually intended to bind to the underlying haskell, but until Agda&#39;s compiler gets better (or we make specialized code extraction for domain-specific cases) it won&#39;t be much use :/<div>
<br></div><div><br><br><div class="gmail_quote">On Sat, Oct 2, 2010 at 7:17 PM, Don Stewart <span dir="ltr">&lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Could Agda target one of the high performance array libraries in<br>
Haskell?  E.g. repa or vector?<br>
<br>
txa:<br>
<div><div></div><div class="h5">&gt; While Andreas is correct - that currently Agda doesn&#39;t offer<br>
&gt; competetive performance for anything including arrays (indeed Agda<br>
&gt; programs are compiled via Haskell), it is also correct that in<br>
&gt; principle dependently typed programs could lead to more efficient code<br>
&gt; without giving up on runtime safety.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Thorsten<br>
&gt;<br>
&gt; On 2 Oct 2010, at 16:57, Andreas Abel wrote:<br>
&gt;<br>
&gt; &gt; In Agda, you cannot implement arrays with worst-case O(1) access natively.<br>
&gt; &gt;<br>
&gt; &gt; You could develop some binding to a Haskell library.<br>
&gt; &gt;<br>
&gt; &gt; I don&#39;t know how much experience you have with Agda, but if you are not happy with Haskell&#39;s performance, it is probably not a good idea to bet on Agda...<br>
&gt; &gt;<br>
&gt; &gt; Hongwei Xi&#39;s ATS combine dependent types with imperative programming, you might try this.  Or maybe Edwin Brady&#39;s Idris.<br>
&gt; &gt;<br>
&gt; &gt; On Oct 2, 2010, at 5:10 PM, Permjacov Evgeniy wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hello. I&#39;m currently implementing some linear algebra in haskell. The<br>
&gt; &gt;&gt; problem is, that polymorphic arrays in Haskell are slow and their sizes<br>
&gt; &gt;&gt; are not encoded in types (there are some tricks, though. But code looks<br>
&gt; &gt;&gt; quite ugly for arrays with dinamic size). Agda has dependent types, so<br>
&gt; &gt;&gt; it is possible to encode array sizes directly in array type. But<br>
&gt; &gt;&gt; language for performance calculations need compact arrays with O(0) fast<br>
&gt; &gt;&gt; indexing. So, is there any simple way to build &#39;unboxed arrays&#39; for<br>
&gt; &gt;&gt; Agda? Maybe there are some useful modules or built-ins ?<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; Agda mailing list<br>
&gt; &gt;&gt; <a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
&gt; &gt;&gt; <a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt; Andreas Abel  &lt;&gt;&lt;      Du bist der geliebte Mensch.<br>
&gt; &gt;<br>
&gt; &gt; Theoretical Computer Science, University of Munich<br>
&gt; &gt; Oettingenstr. 67, D-80538 Munich, GERMANY<br>
&gt; &gt;<br>
&gt; &gt; <a href="mailto:andreas.abel@ifi.lmu.de">andreas.abel@ifi.lmu.de</a><br>
&gt; &gt; <a href="http://www2.tcs.ifi.lmu.de/~abel/" target="_blank">http://www2.tcs.ifi.lmu.de/~abel/</a><br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Agda mailing list<br>
&gt; &gt; <a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
&gt; &gt; <a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Agda mailing list<br>
&gt; <a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
&gt; <a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
&gt;<br>
_______________________________________________<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" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
</div></div></blockquote></div><br></div>