All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add ability to construct IList from generator
- Added
IList
to the list of exports of thefunml
package
- Add the
get_annotations
class method to records so as to hide the potentially unevaluated__annotations__
- Add repr to data types of Record, Enum and IList
- Fix incomplete json parsing of records due to nested typing.ForwardRefs in field annotations.
- Fixed incompatible JSON error produced wit to_json on enums that have no associated data or whose data is
str
- Added
to_json
andfrom_json
builtin expressions
- Changed
IList
to a generic subscriptable type just likeList
e.g.IList[str]
- Fixed how records load lazy annotations
- Fix TypeError: isinstance() arg 2 must be a type or tuple of types when records have Enum fields
- Fix TypeError: isinstance() argument 2 cannot be a parameterized generic in python 3.11
- Fix TypeError in records: isinstance() argument cannot be a parameterized generic
- Extend types in record to handle "..." and "bool | None" etc.
- Expose the
Record
type on the rootfunml
package
- Add
to_dict
to convert a record into a dictionary
- Records can have fields with subscripted builtin types like
list[str]
thanks tofrom __future__ import annotations
. - Records can define default values
- Remove typings of
Expression
,Pipeline
andOperation
.
- Changed typings of
Expression
,Pipeline
andOperation
to be subscriptable likeCallable
is.
- Add ability to curry functions i.e. transform functions with multiple args into functions with fewer args
- Signature of
__rshift__
forPipeline
andExpression
returns either aPipeline
orAny
result of executing the pipeline.
- Added
AsyncPipeline
to handle the pipelines that have asynchronous routines
- Added
Pipeline
's to move all piping to them
- Removed
Context
- Removed
let
andAssignment
's as these had side effects
- Made expressions pure to avoid unexpected outcomes.
- Result helpers:
if_ok
,if_err
,is_ok
,is_err
. - Option helpers:
if_some
,if_none
,is_some
,is_none
. - Sequence helpers:
imap
,ifilter
,ireduce
. - Pipeline helper:
funml.execute()
.
- Changed creation of records to use classes decorated with
record
- Changed creation of enums to use classes subclassed from
funml.Enum
- Removed
map
andfilter
methods ofIList
- Fixed equality check of Result.ERR as originally Result.ERR(TypeError()) was not equal to Result.ERR(TypeError()).
- Initial release
- pattern matching
- piping
- immutable lists, enums, and records
Option
for handling potentially-None dataResult
to return from procedures that may raise an exception