Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
397fe7a
Bundle the kind with the con
nomeata Feb 8, 2019
0dde544
Simplify Ir.TypD
nomeata Feb 8, 2019
4f146b5
Make the representation of con.kind private
nomeata Feb 9, 2019
d5baf2b
Make set_kind check that the kind is not set a second time
nomeata Feb 9, 2019
da7d6ae
Address nit
nomeata Feb 9, 2019
779c806
Merge branch 'master' into joachim/con-ann
nomeata Feb 11, 2019
a8f87df
Refactor avoid to take a `con_set`, not a `con_env`
nomeata Feb 11, 2019
0986cff
Drop con_env argument to Type.avoid (use kind inside)
nomeata Feb 11, 2019
51fc8f7
Remove `con_env` from `scope`
nomeata Feb 11, 2019
933c928
Actually, get rid of `Typing.con_set`
nomeata Feb 11, 2019
0838bc8
Delete definition of `Type.con_env`
nomeata Feb 11, 2019
5eb9c57
Make `kind` a field and type parameter of `Con.t`
nomeata Feb 11, 2019
2b6da66
Write an .mli file for `Check_ir`
nomeata Feb 11, 2019
127ef3a
Merge remote-tracking branch 'origin/master' into joachim/con-ann
nomeata Feb 12, 2019
ceff9e8
Address nits
nomeata Feb 14, 2019
e083606
Merge branch 'master' into joachim/con-ann
nomeata Feb 14, 2019
5ff49b5
Better name for the abstract annotations on cons
nomeata Feb 14, 2019
d8545ac
restore con envs
crusso Feb 18, 2019
cf721c3
replace con_env by con_set in typing.ml
crusso Feb 18, 2019
caf4d00
- simplify IR con_env to have type ConSet.t
crusso Feb 18, 2019
275da62
inlined to_avoid (fixing nit)
crusso Feb 19, 2019
5bfb6c8
merge
crusso Feb 19, 2019
5bfb871
"fix nits and clone constructors in async tranformation to avoid side…
crusso Feb 19, 2019
3661f62
rename to_avoid 2 cons
crusso Feb 20, 2019
bde57f3
only call set_kind once with a proper definition; for now, assert kin…
crusso Feb 20, 2019
b25efb3
cleanup kind setting
crusso Feb 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions samples/counter.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Checking counter.as:
type Counter <: actor {dec : shared () -> (); read : shared () -> async Int}
let Counter : class Int -> Counter
let c : Counter
type Counter = actor {dec : shared () -> (); read : shared () -> async Int}
let Counter : Int -> Counter
let c : actor {dec : shared () -> (); read : shared () -> async Int}
let show : (Text, Int) -> ()
let showAsync : (Text, async Int) -> ()
let testDec : () -> ()
Expand Down Expand Up @@ -287,8 +287,8 @@ testRead()
<= ()
<= ()
-- Finished counter.as:
let Counter : class Int -> Counter = func
let c : Counter = {dec = func; read = func}
let Counter : Int -> Counter = func
let c : actor {dec : shared () -> (); read : shared () -> async Int} = {dec = func; read = func}
let show : (Text, Int) -> () = func
let showAsync : (Text, async Int) -> () = func
let testDec : () -> () = func
Expand Down
10 changes: 5 additions & 5 deletions samples/quicksort.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-- Checking quicksort.as:
type Array<T> = [var T]
type QS<T> <: {quicksort : (Array<T>, Nat, Nat) -> ()}
let QS : class <T>((T, T) -> Int) -> QS<T>
type QS<T> = {quicksort : (Array<T>, Nat, Nat) -> ()}
let QS : <T>((T, T) -> Int) -> QS<T>
let a : [var Int]
let cmpi : (Int, Int) -> Int
let qs : QS<Int>
let qs : {quicksort : (Array<Int>, Nat, Nat) -> ()}
-- Interpreting quicksort.as:
QS(func)
<= {quicksort = func}
Expand Down Expand Up @@ -97,8 +97,8 @@ quicksort([8, 3, 9, 5, 2], 0, 4)
<= ()
<= ()
-- Finished quicksort.as:
let QS : class <T>((T, T) -> Int) -> QS<T> = func
let QS : <T>((T, T) -> Int) -> QS<T> = func
let a : [var Int] = [2, 3, 5, 8, 9]
let cmpi : (Int, Int) -> Int = func
let qs : QS<Int> = {quicksort = func}
let qs : {quicksort : (Array<Int>, Nat, Nat) -> ()} = {quicksort = func}

4 changes: 2 additions & 2 deletions src/arrange_ir.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ and dec d = match d.it with
| VarD (i, e) -> "VarD" $$ [id i; exp e]
| FuncD (cc, i, tp, p, t, e) ->
"FuncD" $$ [call_conv cc; id i] @ List.map typ_bind tp @ [pat p; typ t; exp e]
| TypD (c,k) ->
"TypD" $$ [con c; kind k]
| TypD c ->
"TypD" $$ [con c; kind (Type.kind c)]

and typ_bind (tb : typ_bind) =
Con.to_string tb.it.con $$ [typ tb.it.bound]
Expand Down
Loading