I would like to announce a small library hswip. It is an analogue of pyswip [1] python library in haskell.<br><br>Hswip allows to embed swi-prolog [2] interpreter into your haskell applications in a convenient way.<br><br>
Let&#39;t look at an example:<br>    main = do<br>      prologInit [&quot;-q&quot;,&quot;-nosignals&quot;]<br>      prologCall &quot;asserta(a(b,c)).&quot;<br>      prologCall &quot;asserta(parent(pam, bob)).&quot;<br>      prologCall &quot;asserta(parent(tom, bob)).&quot;<br>
      prologCall &quot;asserta(parent(tom, liz)).&quot;<br>      prologCall &quot;asserta(parent(bob, ann)).&quot;<br>      prologCall &quot;asserta(parent(bob, pat)).&quot;<br>      prologCall &quot;asserta(parent(pat, jim)).&quot;<br>
      res &lt;- prologCall &quot;parent(X,Y).&quot;<br>      print res<br><br>    Output:<br>    [[(&quot;X&quot;,&quot;pat&quot;),(&quot;Y&quot;,&quot;jim&quot;)],[(&quot;X&quot;,&quot;bob&quot;),(&quot;Y&quot;,&quot;pat&quot;)],[(&quot;X&quot;,&quot;bob&quot;),(&quot;Y&quot;,&quot;ann&quot;)],[(&quot;X&quot;,&quot;tom&quot;),(&quot;Y&quot;,&quot;liz&quot;)],[(&quot;X&quot;,&quot;tom&quot;),(&quot;Y&quot;,&quot;bob&quot;)],[(&quot;X&quot;,&quot;pam&quot;),(&quot;Y&quot;,&quot;bob&quot;)]]<br>
<br>The library still has alpha quality and there are many things missing including exception handling and BSD license.<br><br>Any feedback is welcome!<br><br>-Evgeny Tarasov<br><br>[1] <a href="http://code.google.com/p/pyswip/">http://code.google.com/p/pyswip/</a><br>
[2] <a href="http://www.swi-prolog.org/">http://www.swi-prolog.org/</a><br>[3] <a href="http://hackage.haskell.org/package/hswip-0.3">http://hackage.haskell.org/package/hswip-0.3</a><br>