Arc Forumnew | comments | leaders | submitlogin
2 points by Oscar-Belletti 3117 days ago | link | parent

Actually I was wrong in saying that in the installation folder it worked. In the installation folder it succeeded in loading the "news.arc" file, and failed at runtime. While in the other folder that failed, because in that folder I already tried with anarki and created some news/bans and this is why it failed to load: the diskvar didn't work. However the problem wasn't in diskvar: it was in "file-exists" which should return the name of the file in case of true: because of this when I just modified "diskvar" it still gave me the contract violation error, I think because the arc code relies on the fact that file-exists returns true. I changed in "lang/arc/3.1/main" the line "(def file-exists (x) (tnil (file-exists? x)))" in "(def file-exists (x) (if (file-exists? x) x nil))". Now I successfully run the news!


2 points by akkartik 3116 days ago | link

Awesome! If you submit a pull request on github we'll give you (more) credit for fixing this.

I see some more tnil in lang/arc/3.1/main. It would also be good to check if any other functions are incompatible with Arc 3.1.

-----