Today I have finished implementing 90% of primitive operators; Pugs can now evaluate most simple expressions, including junctive autothreading and magical/infinite ranges. Their implementation are in:
http://wagner.elixus.org/~autrijus/darcs/pugs/Prim.hs As such, there are some corner cases I couldn't find in the spec; please correct me if my treatment is wrong: * What is the value of a pair in numeric context? in string context? Currently I'm taking the ".value" part as its value. * What is the value of a reference in any of the scalar contexts? Currently I'm blindly dereferencing it. * How many bits are "+^" operating on? Currently it is using a native Unsigned Int. * Does "**" flatten recursively? Currently it only flattens the first level of the list. * Does "(3&0) and (4|0)" evaluate to "(3&0)" or "False"? Currently it evaluates to "(3&0)". Thanks, /Autrijus/
pgpk3iL9u9fbi.pgp
Description: PGP signature