DavidArno / SuccincT

Discriminated unions, pattern matching and partial applications for C#
MIT License
267 stars 15 forks source link

Preparation for v3.1 release #46

Closed DavidArno closed 6 years ago

DavidArno commented 6 years ago

The following tasks need completing, in order to release v3.1:

Coding

Documentation

Release

peter-majeed commented 6 years ago

@DavidArno thanks for pushing this forward! I put together the markup for the documentation of the Union.Value<TResult> method. Let me know if I can help out with anything else there.


Imperative Use

As an alternative to using a union in a functional style, its value can be directly accessed by more traditional, imperative style C# code. One method and three read-only properties are provided for this purpose:

Value

public TResult Value<TResult>()

Returns the value of the union directly. If the value of the union is not of the TResult type, an InvalidOperationException will be thrown.

Case

public Variant Case { get; }

Returns Variant.Case1 if the value is of T1 or Variant.Case2 if the value is of T2.

Case1

public T1 Case1 { get; }

If Case is Variant.Case1, this will return the value held by the union. Otherwise an InvalidOperationException will be thrown.

Case2

public T2 Case2 { get; }

If Case is Variant.Case2, this will return the value held by the union. Otherwise an InvalidOperationException will be thrown.

peter-majeed commented 6 years ago

@DavidArno is there any way we can help with any of the remaining tasks? We're trying to use the Case<> method sooner rather than later, but we'd rather not fork the repo in our private nuget feed.

Odonno commented 6 years ago

Yes. Count me in if you want help to complete this release. Not sure if I can really be helpful but we can discuss about it together.

DavidArno commented 6 years ago

@peter-majeed & @Odonno,

My apologies for the huge delay. I have been tied up in a major house renovation for the last few months and will continue to be tied up until the end of March. As such, I've not really been able to devote any time to SuccincT. However, checking things, I realised that all that was holding up the release was documenting the cons pattern matching. So I've decided to leave that unfinished and release v3.1. It should appear on the nuget server in the next hour or so.

Once again, apologies for the delays.

DavidArno commented 6 years ago

Oh and thanks to you both for your offers of help. Knowing that people cared that much spurred me on to putting a bit of effort in to getting v3.1 out. Thanks, both.

peter-majeed commented 6 years ago

No problem, @DavidArno, things look good here!

Odonno commented 6 years ago

@DavidArno I hope you're fine. Can we plan a release date for 4.0?