2025-02-14: Fuzion February Update
Last month, the stability of the fz
was improved significantly
when handling faulty input source files. Furthermore, there was significant
cleanup in code related to the Fuzion Intermediate Representation which will
lead to the ability to safe the IR into a file for later use by tools like
code generators or analysers.
- General
FOSDEM had a talk on Fuzion: Effects Everywhere: Error Handling and Design-By-Contract in Fuzion, a video recording and slides are available, check it out if you where not there!
The GreenCode project has started where Tokiwa Software GmbH is one of 26 partners from 9 European countries working software optimisation to manage and improve energy efficiency. Main goals for us is to use Fuzion with its effect handlers to model, control and reduce resource usage.
- Base library
-
New base library features
-
A new feature
expanding_array
provides an efficient immutable but extensible array. This is now used internally to implement an efficient partially sorted mapps_map
, fix #4637 (#4651)This permits efficiently adding elements to an array similar to Java's
ArrayList
as follows:for a := (container.expanding_array String).empty, a.add "😜"*i i in 1..6 else say a
Added
Sequence.dedup
andSequence.unique
to remove (adjacent) duplicates in aSequence
, fix #4552, workaround for #4628 (#4629)Added
Sequence.scan
that takes a function instead of aMonoid
(#4644)Added
Sequence.sliding
andSequence.group_map_reduce
(#4655)Added features like
codepoint.is_ascii_digit
for existing sets (#4635)Added ffi convenience features:
null
,is_null
(#4533)
-
-
Changes to the following standard library features
buffered.writer
no uses mutate type parameter frombuffered
(#4595)Avoid
as_list
inSequence.as_array
if array backed (#4653)Changed
io.out
/io.err
to beref
featuresio.Out
/io.Err
which avoids then need forPrint_Handler
when defining a different effect handler (#4590)change impl of
Print_Handler
andprint_effect
(#4579)Let
mutable_tree_map
inherit fromMutable_Map
and add features (#4638)Move type parameter from
io.buffered.reader
toio.buffered
(#4492)orderable provide implementation for
type.equality
(#4675)unify string representation of maps (#4646)
modules: Move declaration outside of
String
as a workaround for #4619 (#4620)
-
- Parser
- Front end
Fix crash when processing
count(n) => if true then count 1 else count 2 _ := [3].map count |> sum
constraintAssignableFrom
returnfalse
forvoid
unless constraint… (#4618)Fix crash when processing
o array i32->i32 := [-] # array of unary function `i -> -i` say (o[0].call 3)
InlineArray.propagateExpectedType
fix check condition (#4606)Fix crash when processing
m 3 m(a A) => if A : i32 then m(B type, b B) =>
check for duplicate feature when adding type parameter (#4612)
fix bug when inner feature inherits from outer feature and outer has type parameters (#4688)
fix handling of type constraints in inherited preconditions that resulted in unjustified errors: fix
Context.exterior
and comparison of type parameters (#4652)Enable partial application of type feature as in
m.map String.from_codepoints
: fix resolving of unresolved type universe (#4663)remove strange subsequent errors reported in feature that with arg types inferred from call site if there is no such call site (#4607)
Improve type inference for
Lazy
value in expressions likeo := true.as_option 42
(#4669)Fixed to eager partial application: do not wrap function argument into a lambda, fix #4609 (#4616)
remove uses of ast.Context anywhere but
ast
(#4627)Fix partial application when calling infix operator, fix #4687 (#4689)
In assignment
f := ... (x,y) -> ... f ...
, the declared fieldf
is now accessible within the lambda: fe: fix field on left side should be visible in lambda (#4608)re-enable partial application for expr in parentheses, e.g.,
("hi" |> say)
(#4615)fix crashes of `fz` command:
after reporting justified errors: fix
initialValueFromCall
in case of errors (#4611)fix calling type on partial not resulting in error (#4625)
after failure to infer type parameter (#4610)
fix field for result not added in nested
match
/if
expr (#4525)Relax precondition for
AbstractFeature.cotype
(#4594)fe: fix index out of bounds in
SourceModule.inScope
(#4613)fe: fix soundness issue in
checkLegalQualThisType
(#4660)
- DFA
- FUIR
implement clazz is array in fuir (#4602)
cache result field (#4664)
do not create new clazzes when
lookupDone==true
(#4643)do not create outerRef clazz when lookupDone (#4665)
fix instability in
clazz._id
(#4648)improve robustness of
clazz_array_u8
, etc. (#4578)normalise outer clazzes of fields to always be values (#4585)
record which sites and code where used by DFA (#4666)
Remove fuir field index (#4588)
- All back end
native:
sys.process
,sys.pipe
convert to native (#4575)
- C back end
- Windows
be/win: fix compilation of
fuzion.dll
(#4591)
- Build tools
- Tests
- Documentation
Cheers,
--The Fuzion Team.