Arc Forumnew | comments | leaders | submitlogin
2 points by conanite 5205 days ago | link | parent

And beware of 'a&~b - it hangs (at least it did 132 days ago ... http://arclanguage.org/item?id=10513 ), I don't know if this has been fixed.


1 point by fallintothis 5204 days ago | link

Yeah, it's still a problem. Oddly enough, I only ever noticed it in test code that expanded ssyntax tree-wise (vs. Arc's symbol-wise ssexpand). I didn't put deliberate thought into making sscontract aware of the bug, but I think it's avoided because of careful precedence separation.

  arc> (sscontract '(andf f (complement g)))
  (andf f ~g)
  arc> (sscontract '(compose f (complement g)))
  f:~g
  arc> (sscontract '(f ~g))
  (f:complement g) ; ew...should probably return (f ~g)
  arc> (sscontract '(f '~g))
  (f (quote ~g))
Thanks for the andf case, by the way. Hadn't thought of that one. If you find any incorrect contractions, please let me know. If you want, you can use bitbucket's issue tracker: http://bitbucket.org/fallintothis/contract/issues/

-----