-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tmoux
committed
Jul 15, 2020
1 parent
a4f6d81
commit 959f4d9
Showing
14 changed files
with
190 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type Int:z: | ||
def +(i:Int):Int | ||
def -(i:Int):Int | ||
|
||
type A:z: | ||
type T >= Int | ||
val a:z.T | ||
|
||
type B:z: | ||
type T <= Int | ||
val a:z.T | ||
|
||
subtype B extends A | ||
|
||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
type Int:z: | ||
def +(i:Int):Int | ||
def -(i:Int):Int | ||
|
||
type A:z: | ||
type T >= Int | ||
val a:z.T | ||
|
||
type B:z: | ||
type T <= Int | ||
val a:z.T | ||
|
||
type C:z: | ||
val a:Int | ||
|
||
subtype Unit {val a:Int} extends C | ||
subtype Unit {val a:Int} extends A | ||
|
||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
type Int:z: | ||
def +(i:Int):Int | ||
def -(i:Int):Int | ||
|
||
type Cloneable:z: | ||
type T <= Unit | ||
def clone(u:Unit):z.T | ||
|
||
type String:z: | ||
type T <= String | ||
def clone(u:Unit):z.T | ||
subtype String extends Cloneable | ||
|
||
type A:z: | ||
def makeClone(arg:Cloneable):arg.T | ||
val a = new this:A: | ||
def makeClone(arg:Cloneable):arg.T: | ||
arg.clone(()) | ||
|
||
val s = new this:String: | ||
type T <= String | ||
def clone(u:Unit):this.T: | ||
a.makeClone(this) | ||
|
||
|
||
a.makeClone(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
type Int: | ||
type Int:z: | ||
def +(i:Int):Int | ||
def -(i:Int):Int | ||
|
||
val succ = x:Int => x + 1 | ||
val fst = x:Int => y:Int => x | ||
fst 7 | ||
fst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.