Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retronym/scratch2
playground
https://github.com/retronym/scratch2
Last synced: 26 days ago
JSON representation
playground
- Host: GitHub
- URL: https://github.com/retronym/scratch2
- Owner: retronym
- Created: 2013-06-26T12:27:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-27T11:18:19.000Z (over 11 years ago)
- Last Synced: 2024-04-16T07:05:28.921Z (7 months ago)
- Language: Scala
- Size: 124 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
scratch2
========Prototype of redesigned type-checking/transformation for scala-async.
- [macro](https://github.com/retronym/scratch2/blob/master/macros/macros.scala)
- [usage](https://github.com/retronym/scratch2/blob/master/main/main.scala)Here's what it does.
```scala
performing macro expansion AsyncMini#6986.spliceAndDice#11869[String#6553]({
val y#12006: String#1799 = "";
val x#12007: y#12006.type = y#12006;
def foo#12008(p#12013: y#12006.type): String#1799 = y#12006;
def bar#12009[A#12010 >: Nothing#3295 <: Any#3294]: Unit#1511 = ();
bar#12009[y#12006.type];
val z#12012: y#12006.type = foo#12008({
"boo";
x#12007
});
(() => {
scala#23.this.Predef#801.println#6701("called");
x#12007
})#12014.apply#12018()
}) at source-/Users/jason/code/scratch2/main/main.scala,line-3,offset=97
{
class C#12041 extends AnyRef#2160 {
def #12043(): C#12041 = {
C#12041.super.#4664();
()
};
private[this] var y$lifted#12044: String#1799 = _;
private[this] var x$lifted#12045: y$lifted#12044.type = _;
private[this] var z$lifted#12046: y$lifted#12044.type = _;
def foo#12047: String#1799 = {
C#12041.this.y$lifted#12044 = "";
C#12041.this.x$lifted#12045 = C#12041.this.y$lifted#12044;
def foo#12008(p#12013: y$lifted#12044.type): String#1799 = C#12041.this.y$lifted#12044;
def bar#12009[A#12010 >: Nothing#3295 <: Any#3294]: Unit#1511 = ();
bar#12009[y$lifted#12044.type];
C#12041.this.z$lifted#12046 = {
val arg$1#12040: x$lifted#12045.type = {
"boo";
C#12041.this.x$lifted#12045
};
foo#12008(arg$1#12040)
};
(() => {
scala#23.this.Predef#801.println#6701("called");
C#12041.this.x$lifted#12045
})#12014.apply#12018()
}
};
val c#12042: C#12041 = new C#12041();
c#12042.foo#12047
}
```TODO: expand the test with existentials