Funicular-Switch
Funicular-Switch copied to clipboard
Funicular-Switch is a lightweight C# port of F#'s result and option types to support 'railway oriented' programming patterns. Focus on the happy path, without loosing error information.
C# has very limited type inference. An intermediate monadic type representation would support C#'s type inference. For instance returning a `OptionNone` from `Option.None` that will be implicitly converted to an...
Reproduce: ```csharp static class Outer { [UnionType(CaseOrder = CaseOrder.AsDeclared)] public partial record InitResult { public record Sync_ : InitResult; public record OneTimeSync_(string TempRepoFolder) : InitResult; public record NoSync_() : InitResult;...
I am looking for an operator for the following use case: ``` csharp var result = option1.Match( some => some, none: option2.Match( some => some, none: option3.Match( some => some,...
e.g. when there is ``` csharp [UnionType] internal abstract partial record SomeUnionType {} ``` then the fluent assertion extensions and assertions class should not be generated in the unit test...
Example following: ```cs string? s1 = null; Option t1 = s1; string s2 = null; Option t2 = s2; ``` It causes warning if nullable is enabled but otherwise it...
Add support for generic constraints to complete the support for generic union types
Do we need an option some type too?
All out Match, Map, Bind methods should be decorated with this attribute to avoid missing the return value.
We want to move the useful extensions we currently use across different projects into FS so that we don't have to copy them all the time.