This repository contain a fork of the Roslyn compiler to add support for concepts (think somewhere between Haskell typeclasses and Scala implicits to C#). This work is being carried out by Claudio Russo (@crusso) and Matt Windsor (@CaptainHayashi).
This is an experimental prototype, and is not suitable for production or even for drop-in addition to the mainstream C# compiler. Expect it to eat your laundry, set fire to your cats, and otherwise ruin your day.
Examples of the syntax, which may be compiled with this fork's csc, can be
found in the concepts\tests and concepts\code directories.
We outline our general design (based on implementation ideas by Claudio Russo)
in concepts\docs\concepts.md.
Open (and closed) design decision questions and requests for comment are hosted on a separate repository.
See Roslyn's existing documentation on building, testing, and debugging: we haven't changed the build process for the compiler.
First cd to concepts and compile ConceptAttributes.dll:
csc /target:library ConceptAttributes.cs
This file must be referenced by anything using concepts.
Then, you can compile the examples:
- The examples in the
concepts\testsdirectory have aMakefilethat can be used withnmake. These reference the compiler built above, so remember to buildcsc! - Other examples have
MSBuildsolutions: you will need to open these with a version of Visual Studio with ourcscadded (ie, run from theCompilerExtensionsproject of Roslyn). See above. - To build individual files using concepts, just use our
csc. Remember to reference (/reference)ConceptAttributes.dll: things break without it.