June 25th, 2010
· Pattern bindings in case statements are now like any other assignment -- scoped to the entire function and in the same namespace as all the other locals. Patterns no longer create a new scope, and the variables they create no longer shadow existing locals. It is now a type error if a local variable has the same name but different type as a pattern variable (backwards incompatible).
· (LP: #513638) * It is now a compiler error if a switch statement does not cover all possible constructors of the type it switches over, preventing the possibility of runtime pattern match failure errors (backwards incompatible).
· (LP: #408411) * Variables no longer require declaration. Any variable assigned in a function is now implicitly a local variable. It is no longer an error to assign to a global variable or an undefined variable (this just creates a new local variable).
· (LP: #483082) * The field reference and replace expressions and the field update statement now work (previously they displayed "not implemented" errors). It is now possible to access and update individual fields of an object by name, without having to use a switch.
· (LP: #439171) * The field replace statement is now an expression; its result is the updated object. It previously didn't make much sense because the statement performed an implicit assignment of its source variable.
· (LP: #408301) * The field update operator changed from "=" to "=!", reflecting its impure nature.
· (LP: #595782) * It is now an error to have two fields of the same name in a given constructor.
· (LP: #513585) * It is now an error to have two variables of the same name in a given pattern.
· (LP: #509939) * Reading the value of (and therefore executing the body of) a computable global constant now caches the result so subsequent reads do not re-execute the body. Previously CGCs would be re-executed on each read.
· (LP: #491697) * The built-in "is" function has been moved to the "impure" module.
· (LP: #582634) * The "is" function now works on objects of user-defined types (previously always returned 0).
· (LP: #585724) * Added prelude function "ref" which gets the element of a list with a particular index.
· (LP: #582635) * Paul Bone: Fixed error compiling Mars on some systems, due to Readline code.
· (LP: #552168) * Critical type safety problem -- if a declared local variable and pattern binding have different types, after the switch, the variable name has the declared type, but the value bound by the case (of the wrong type). Fixed by giving pattern bindings the full function scope, forcing them to have the same type as any declared variable.
· (LP: #513638) * Internal error "Phi missing predecessor in CFG" for programs with complex nested switches.
· (LP: #567082) * Internal error "Field reference to something not an ADT" for case statements with a nested pattern with two fields.
· (LP: #576375) * Type error for cases with int literals on polymorphic types.
· (LP: #509457) * Internal error for string literals with '\0.
· (LP: #534159) * Internal error calling "error" or "get_env" with '\0 in string.
· (LP: #534161) * Library function "encodeURIComponent" gives garbage output on strings with non-byte characters.
· (LP: #585703) * Now correctly sets the exit status of Mars to the result of main – rounds to a machine-size int with wraparound rather than using mod.
· (LP: #552413) * The "show" function now correctly includes empty parens for terms built from nullary constructors.
· (LP: #587787) * Replaced "dummy term binding" technique with explicit rigid type variables (as now described in documentation for type unification).
· (LP: #488595) * The control-flow graph (CFG) representation now includes full type information.
· (LP: #574108) * The t_switch instruction no longer includes fully-recursive patterns, but a limited format which matches only a single tag. Switch statements are now factored into this much lower-level construct which is easier to compile into machine code.
· (LP: #408411) * The interactive environment now uses SSA variable names, so variables which are re-assigned are no longer physically clobbered in the environment; they are assigned with a new qualified name. This makes the semantics of interactive consistent with the rest of the language and fixes issues with certain backends or analyses.
· (LP: #580487) * Fixed test suite silently treating invalid "outcome" values as "fail".
· (LP: #574141) * No longer generates code for statements which are inaccessible because they are preceded by a return statement. This prevents malformed code generation.
· (LP: #517403) * Fixed parser not allocating a type to subexpressions of expressions which already have a type annotation.
· (LP: #578082) * Interactive mode executes type-annotated versions of statements.
· (LP: #578084) * Test suite is now orders of magnitude faster to run (fixed re-compilation for every case, causing N^2 behaviour).
· (LP: #589000) * Interpreter interface is now abstracted so it is possible to plug in different interpreter backends.
· (LP: #550708) * In the test framework, expecting a compile error now causes all of the runtime tests to be expected to be skipped, so they don't raise large errors when they are.
· (LP: #596734) * Terminator instructions now hold a context object.
· (LP: #408291) * Function signatures no longer have an "argmode". This was part of some uniqueness information analysis which was abandoned for a different representation, and has since been unused and completely obsolete.
· (LP: #550739) * All library functions are now documented.
· (LP: #486958) * The documentation is now syntax-highlighted for all Mars code.
· (LP: #576776) * If a bug in Mars causes an internal error, it will be displayed much more neatly, with a link to the "file bug" page on the bug tracker.
· (LP: #534165) * The test framework no longer generates .py files with Mars assembly (a bug dating back to when we actually generated Python output).
· (LP: #521992) * The src directory now includes a Makefile, so Mars can be compiled with a simple make.
· (LP: #522477) * The Mars Vim script (misc/mars.vim) has an updated list of built-in names.