Skip to content

Unknown6656/roslyn

 
 

Repository files navigation

Roslyn fork for Concept C#

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

Examples of the syntax, which may be compiled with this fork's csc, can be found in the concepts\tests and concepts\code directories.

Design overview

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.

How to compile the compiler

See Roslyn's existing documentation on building, testing, and debugging: we haven't changed the build process for the compiler.

How to compile the examples

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\tests directory have a Makefile that can be used with nmake. These reference the compiler built above, so remember to build csc!
  • Other examples have MSBuild solutions: you will need to open these with a version of Visual Studio with our csc added (ie, run from the CompilerExtensions project of Roslyn). See above.
  • To build individual files using concepts, just use our csc. Remember to reference (/reference) ConceptAttributes.dll: things break without it.

About

Experimental concepts for C# using Roslyn

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 56.9%
  • Visual Basic .NET 42.2%
  • HTML 0.6%
  • 1C Enterprise 0.2%
  • TeX 0.1%
  • PowerShell 0.0%