Re: [Felix-language] Generalised array support

2012-06-24 Thread john skaller
Scroll down for important stuff .. first: The latest code can do this: // var a: int ^ 6 = (1,2,3,4,5,6); println$ (case 1 of 6) a; var k = case 1 of 6; println$ k a; var pa = &a; var pb = C_hack::cast[&(int ^ (3 * 2))] pa; var b = *pb; println$ b . (case 0 of 3, case 0 of 2); pr

[Felix-language] Generalised array support

2012-06-23 Thread john skaller
I have change the compiler so arrays are now accessed directly by the compiler when given the correct index type, but only for unitsums. For example: / var a: int ^ 3 = (1,2,3); println$ (case 1 of 3) a; var k = case 1 of 3; println$ k a; now works and is implemented dir