This is a DSL, Parser and Code-Generator to specify DU Types in C#.Use "CSharpUnionTypeGenerator" as the custom tool to process files containing DU specifications. A typical file looks like this:
namespace CoolMonads { union Maybe<T> { None | Some<T> }; }
The tool will generate a C# code-behind file with a class named Maybe<T> with appropriate behaviour and value semantics. Notes:
The source code is available at https://github.com/johnazariah/csharp-uniontypes Follow the tutorial at https://johnazariah.github.io/csharp-uniontypes/tutorial.html
Pull-Requests and Issues are welcome. |