Sophia compiler v4.2.0 is released
The HTTP front-end to the compiler is available through docker-hub. We expect the SDKs and development tools to pick up the (minor) changes in the coming weeks. The CLI compiler has a new option to extract the compiler version from bytecode. The HTTP front-end also has a new endpoint for extracting compiler version from bytecode, as well as a new endpoint for getting FATE assembler code from FATE bytecode. The compiler itself now allows pattern matching in left-hand sides, this means code can be written in an even more nice way, see the examples below and at Advent of Code - 2019
What is new - aesophia
Added
- Allow separate entrypoint/function type signature and definition, and pattern
matching in left-hand sides:function length : list('a) => int length([]) = 0 length(x :: xs) = 1 + length(xs)
- Allow pattern matching in list comprehension generators (filtering out match
failures):function somes(xs : list(option('a))) : list('a) = [ x | Some(x) <- xs ]
- Allow pattern matching in let-bindings (aborting on match failures):
function test(m : map(int, int)) = let Some(x) = Map.lookup(m, 0) x
Changed
- FATE code generator improvements.
- Bug fix: Handle qualified constructors in patterns.
- Bug fix: Allow switching also on negative numbers.
What is new - aesophia_http
Added
- Added the endpoint
fate-assembler
- Added the endpoint
compiler-version
Changed
- Update to Sophia 4.2.0
What is new - aesophia_cli
Added
- Added option
--compiled_by
to extract the compiler version from either a file or a
contract byte array.
Changed
- Updated to Sophia 4.2.0