<div dir="ltr"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Hello!</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Disclaimer: I have not worked in either of the languages I am talking about (Curry, Mercury).</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Curry is logical, but it uses different logic mechanisms than Prolog.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Curry is using something called "narrowing" which is very different to Prolog's SLD-resolution. AFAICT narrowing (or needed narrowing) corresponds to lazy evaluation while SLD-resolution corresponds to strict evaluation.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Mercury is another language to combine functional and logical features. But while Curry is Haskell-based with added mechanism of narrowing, Mercury is Prolog-based with Haskell-like type system. As Mercury is based on Prolog, there is an interesting part of a type system that corresponds to in/out parameters of a predicate. A predicate may also have multiple type signatures (since a some parameters may be in/out switched). The way Mercury treats IO in a pure way is also interesting (IIRC it uses something called unique parameter for the World).</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">I see both languages as "pure". Both languages have pure functional parts (deterministic functions in Curry and function signatures in Mercury).</font></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">I may be wrong, but it seems that of those two languages Mercury is a bit "more alive".</span></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Best,</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Nick</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-28 21:37 GMT+03:00 Timotej Tomandl <span dir="ltr"><<a href="mailto:timotej.tomandl@gmail.com" target="_blank">timotej.tomandl@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Second thing, is it purely logical?<div>And do we get any advantage when reasoning?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-01-28 19:27 GMT+01:00 Andy Morris <span dir="ltr"><<a href="mailto:andy@adradh.org.uk" target="_blank">andy@adradh.org.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Yes. It has monadic IO exactly like Haskell's.<div><div><div><br><div><div><blockquote type="cite"><div>On 28 Jan 2015, at 19:22, Timotej Tomandl <<a href="mailto:timotej.tomandl@gmail.com" target="_blank">timotej.tomandl@gmail.com</a>> wrote:</div><br><div><div dir="ltr">By pure logical I mean having features like in Pure Prolog.<div>I am not sure if Curry is pure functional or not. Is it?</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-28 19:09 GMT+01:00 Mathieu Boespflug <span dir="ltr"><<a href="mailto:0xbadcode@gmail.com" target="_blank">0xbadcode@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">By "pure logical", do you mean "logically consistent"? Or do you mean<br>
a logic language in the style of Prolog but with no non-logical<br>
effects such as programmatic pruning of the search tree?<br>
<br>
If the former, there are many languages in that fit the bill (or at<br>
least are believed to be consistent): Coq, Agda, HOL, ... The key<br>
difference between those languages and Haskell is that all functions<br>
must be provably total. See<br>
<br>
<a href="https://uf-ias-2012.wikispaces.com/file/view/turner.pdf" target="_blank">https://uf-ias-2012.wikispaces.com/file/view/turner.pdf</a><br>
<br>
from the father of a direct ancestor of Haskell, arguing for precisely<br>
this: a total functional programming language (not that I agree that<br>
such a language as proposed in the paper would be particularly<br>
useful).<br>
<br>
If you mean the former, there are language that try to combine logical<br>
and functional programming, see e.g. Curry just mentioned in this<br>
thread a few minutes ago.<br>
<div><div><br>
<br>
On 28 January 2015 at 18:22, Timotej Tomandl <<a href="mailto:timotej.tomandl@gmail.com" target="_blank">timotej.tomandl@gmail.com</a>> wrote:<br>
> This question was bugging me for quite a long time. Can we have a language<br>
> which uses the functional logic while being both pure functional and pure<br>
> logical?<br>
> Do we get any advantages from maintaining both both of this purities at the<br>
> same time?<br>
><br>
> P.S.: I have feeling the answer is no, but I am not sure.<br>
><br>
</div></div><div><div>> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>