language-ext v3.3.51 Release Notes
Release Date: 2020-01-31 // about 4 years ago-
The attributes:
NonEq
- to opt out of equalityNonOrd
- to opt out of orderingNonShow
- to opt out ofToString
NonHash
- to opt out ofGetHashCode
NonSerializable
,NonSerialized
- to opt out of serialisationNonStructural == NonEq | NonOrd | NonHash
NonRecord == NonStructural | NonShow | NonSerializable
Can now be used with the
[Record]
and[Union]
code-gen.For
[Union]
types you must put the attributes with the arguments:[Union]public abstract partial class Shape\<NumA, A\> where NumA : struct, Num\<A\> { public abstract Shape\<NumA, A\> Rectangle(A width, A length, [NonRecord] A area); public abstract Shape\<NumA, A\> Circle(A radius); public abstract Shape\<NumA, A\> Prism(A width, A height); }
On the
[Record]
types you put them above the fields/properties as normal:[Record]public partial struct Person{ [NonOrd] public readonly string Forename; public readonly string Surname; }
๐ Both the
[Union]
case-types and the[Record]
types now have aNew
static function which can be used to construct a new object of the respective type. This can be useful when trying to construct types point-free.๐ Some minor bug fixes to
Try.Filter
andmanyn
in Parsec. Thanks to @bender2k14 and @StefanBertels