Experimental concepts for C# using Roslyn
C# Visual Basic HTML 1C Enterprise TeX PowerShell
Pull request Compare This branch is 329 commits ahead, 6051 commits behind dotnet:master.
Latest commit 3d32662 Jan 14, 2017 @crusso crusso delete
Permalink
Failed to load latest commit information.
.github Update ISSUE_TEMPLATE.md Feb 18, 2016
build Merge pull request #12850 from vslsnap/merge-dev15-preview-4-into-mas… Aug 2, 2016
concepts delete Jan 13, 2017
docs Introduce a "Latest" language version, which maps to the latest Jul 28, 2016
src Replace typemap merging with composition. Aug 12, 2016
temp/ClassLibrary1 (REBASE ME) Remove accidentally committed binaries Jun 9, 2016
.editorconfig .editorconfig: Don't set indent_size for all files Nov 21, 2015
.gitattributes Add comment explaining gitattributes change Mar 11, 2016
.gitignore Download NuGet.exe instead of having it checked in Jun 29, 2016
BuildAndTest.proj Merge from future into features/patterns Apr 1, 2016
Compilers.sln Microsoft.CodeAnalysis.Metadata and Microsoft.CodeAnalysis.PooledObjects Jul 21, 2016
CrossPlatform.sln Microsoft.CodeAnalysis.Metadata and Microsoft.CodeAnalysis.PooledObjects Jul 21, 2016
License.txt Include the actual license text. Feb 6, 2015
Makefile Download NuGet.exe on Linux / Mac Jun 29, 2016
NuGet.Config Merge remote-tracking branch 'dotnet/dev15-preview-4' into merge-dev1… Aug 1, 2016
README.md Fix minor README typo. Jun 23, 2016
Restore.cmd Properly restore packages for the Roslyn SDK Jul 4, 2016
Roslyn.sln Fixed a merge conflict Jul 29, 2016
SetDevCommandPrompt.cmd Enable building and (some) testing on machines with only Dev15 Previe… Jul 20, 2016
cibuild.cmd Fixed up some errors revealed by CI Jul 31, 2016
cibuild.sh Make cibuild.sh --release work Jul 27, 2016
netci.groovy Move last custom MicroBuild step to Roslyn repo Jul 12, 2016

README.md

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.