]> git.lizzy.rs Git - rust.git/commitdiff
Port the tests to the typaram foo<T> syntax.
authorErick Tryzelaar <erick.tryzelaar@gmail.com>
Wed, 10 Aug 2011 16:27:22 +0000 (09:27 -0700)
committerGraydon Hoare <graydon@mozilla.com>
Tue, 16 Aug 2011 22:05:56 +0000 (15:05 -0700)
132 files changed:
src/test/bench/shootout-fannkuchredux.rs
src/test/bench/shootout-nbody.rs
src/test/bench/shootout-pfib.rs
src/test/bench/task-perf-word-count.rs
src/test/compile-fail/bad-expr-path.rs
src/test/compile-fail/bad-expr-path2.rs
src/test/compile-fail/for-loop-decl.rs
src/test/compile-fail/import.rs
src/test/compile-fail/import2.rs
src/test/compile-fail/import3.rs
src/test/compile-fail/import4.rs
src/test/compile-fail/infinite-vec-type-recursion.rs
src/test/compile-fail/nested-ty-params.rs
src/test/compile-fail/pattern-tyvar-2.rs
src/test/compile-fail/pattern-tyvar.rs
src/test/compile-fail/vec-field.rs
src/test/compile-fail/writing-through-uninit-vec.rs
src/test/compile-fail/writing-to-immutable-vec.rs
src/test/compiletest/common.rs
src/test/compiletest/compiletest.rs
src/test/compiletest/header.rs
src/test/compiletest/procsrv.rs
src/test/compiletest/runtest.rs
src/test/run-fail/bug-811.rs
src/test/run-fail/port-type.rs
src/test/run-fail/task-comm-14.rs
src/test/run-fail/trivial-message2.rs
src/test/run-fail/vec-overrun.rs
src/test/run-fail/vec-underrun.rs
src/test/run-pass/acyclic-unwind.rs
src/test/run-pass/alias-uninit-value.rs
src/test/run-pass/alloca-from-derived-tydesc.rs
src/test/run-pass/alt-join.rs
src/test/run-pass/alt-pattern-no-type-params.rs
src/test/run-pass/basic-1.rs
src/test/run-pass/basic-2.rs
src/test/run-pass/basic.rs
src/test/run-pass/binops.rs
src/test/run-pass/box-inside-if.rs
src/test/run-pass/box-inside-if2.rs
src/test/run-pass/box-unbox.rs
src/test/run-pass/chan-leak.rs
src/test/run-pass/comm.rs
src/test/run-pass/command-line-args.rs
src/test/run-pass/conditional-compile.rs
src/test/run-pass/decl-with-recv.rs
src/test/run-pass/empty-mutable-vec.rs
src/test/run-pass/export-non-interference.rs
src/test/run-pass/expr-alt-generic-box1.rs
src/test/run-pass/expr-alt-generic-box2.rs
src/test/run-pass/expr-alt-generic.rs
src/test/run-pass/expr-block-generic-box1.rs
src/test/run-pass/expr-block-generic-box2.rs
src/test/run-pass/expr-block-generic.rs
src/test/run-pass/expr-fn.rs
src/test/run-pass/expr-if-generic-box1.rs
src/test/run-pass/expr-if-generic-box2.rs
src/test/run-pass/expr-if-generic.rs
src/test/run-pass/foreach-box-drop.rs
src/test/run-pass/generic-exterior-box.rs
src/test/run-pass/generic-obj-with-derived-type.rs
src/test/run-pass/generic-obj.rs
src/test/run-pass/generic-recursive-tag.rs
src/test/run-pass/generic-tag-alt.rs
src/test/run-pass/generic-tag-values.rs
src/test/run-pass/generic-tag.rs
src/test/run-pass/generic-type-synonym.rs
src/test/run-pass/generic-type.rs
src/test/run-pass/hashmap-memory.rs
src/test/run-pass/import4.rs
src/test/run-pass/import5.rs
src/test/run-pass/import7.rs
src/test/run-pass/integral-indexing.rs
src/test/run-pass/issue-507.rs
src/test/run-pass/issue-687.rs
src/test/run-pass/ivec-tag.rs
src/test/run-pass/lazychan.rs
src/test/run-pass/many.rs
src/test/run-pass/mod-view-items.rs
src/test/run-pass/mutable-alias-vec.rs
src/test/run-pass/mutable-vec-drop.rs
src/test/run-pass/native2.rs
src/test/run-pass/nested-pattern.rs
src/test/run-pass/newtype-polymorphic.rs
src/test/run-pass/obj-docs.rs
src/test/run-pass/obj-return-polytypes.rs
src/test/run-pass/obj-with-vec.rs
src/test/run-pass/path.rs
src/test/run-pass/preempt.rs
src/test/run-pass/resource-in-struct.rs
src/test/run-pass/ret-none.rs
src/test/run-pass/rt-circular-buffer.rs
src/test/run-pass/send-type-inference.rs
src/test/run-pass/size-and-align.rs
src/test/run-pass/spawn-types.rs
src/test/run-pass/swap-2.rs
src/test/run-pass/tag-in-block.rs
src/test/run-pass/task-comm-0.rs
src/test/run-pass/task-comm-10.rs
src/test/run-pass/task-comm-11.rs
src/test/run-pass/task-comm-13.rs
src/test/run-pass/task-comm-15.rs
src/test/run-pass/task-comm-3.rs
src/test/run-pass/task-comm-7.rs
src/test/run-pass/task-comm-8.rs
src/test/run-pass/task-comm-9.rs
src/test/run-pass/task-comm-chan-nil.rs
src/test/run-pass/task-comm.rs
src/test/run-pass/task-compare.rs
src/test/run-pass/trivial-message.rs
src/test/run-pass/type-param.rs
src/test/run-pass/type-ptr.rs
src/test/run-pass/use-uninit-alt.rs
src/test/run-pass/use-uninit-alt2.rs
src/test/run-pass/utf8_chars.rs
src/test/run-pass/vec-append.rs
src/test/run-pass/vec-concat.rs
src/test/run-pass/vec-drop.rs
src/test/run-pass/vec-late-init.rs
src/test/run-pass/vec-push.rs
src/test/run-pass/vec-self-append.rs
src/test/run-pass/vec-slice.rs
src/test/run-pass/vec.rs
src/test/run-pass/vector-no-ann-2.rs
src/test/run-pass/while-with-break.rs
src/test/stdtest/comm.rs
src/test/stdtest/deque.rs
src/test/stdtest/either.rs
src/test/stdtest/list.rs
src/test/stdtest/map.rs
src/test/stdtest/vec.rs
src/test/stdtest/vec_str_conversions.rs

index 344bd6606473d3139161aeecc4f24936efe008a7..d4bdbc93b354c7c3421cf5f6a37572c1e94fdab7 100644 (file)
@@ -59,4 +59,4 @@ fn fannkuch(n: int) -> int {
 fn main(args: [str]) {
     let n = 7;
     log #fmt("Pfannkuchen(%d) = %d", n, fannkuch(n));
-}
\ No newline at end of file
+}
index f248dff1cda97bc052300bda6f16562cdfda4243..7657d058d028c7b8c5d959111a257f553b48203f 100644 (file)
@@ -27,7 +27,7 @@ fn main() {
 }
 
 // Body::props is a record of floats, so
-// vec[Body::props] is a vector of records of floats
+// vec<Body::props> is a vector of records of floats
 
 mod NBodySystem {
 
index 72f44507afa58a8770fb96db034457e884aa01d7..31e6ea6fff0cd75b87e65373fe97e49d5ebd752e 100644 (file)
 import std::comm::send;
 
 fn fib(n: int) -> int {
-    fn pfib(c: _chan[int], n: int) {
+    fn pfib(c: _chan<int>, n: int) {
         if n == 0 {
             send(c, 0);
         } else if (n <= 2) {
             send(c, 1);
         } else {
-            let p = mk_port[int]();
+            let p = mk_port<int>();
 
             let t1 = task::_spawn(bind pfib(p.mk_chan(), n - 1));
             let t2 = task::_spawn(bind pfib(p.mk_chan(), n - 2));
index 05d2050abb88b1e9158bd5907b1760fa457d84b3..6baa75e2fa49e85f60409dd81ba50fd34b0cb88a 100644 (file)
@@ -63,18 +63,18 @@ mod map_reduce {
 
     type mapper = fn(str, putter) ;
 
-    type getter = fn() -> option[int] ;
+    type getter = fn() -> option<int> ;
 
     type reducer = fn(str, getter) ;
 
     tag ctrl_proto {
-        find_reducer([u8], _chan[_chan[reduce_proto]]);
+        find_reducer([u8], _chan<_chan<reduce_proto>>);
         mapper_done;
     }
 
     tag reduce_proto { emit_val(int); done; ref; release; }
 
-    fn start_mappers(ctrl: _chan[ctrl_proto], inputs: &[str]) -> [task_id] {
+    fn start_mappers(ctrl: _chan<ctrl_proto>, inputs: &[str]) -> [task_id] {
         let tasks = ~[];
         for i: str in inputs {
             tasks += ~[task::_spawn(bind map_task(ctrl, i))];
@@ -82,12 +82,12 @@ fn start_mappers(ctrl: _chan[ctrl_proto], inputs: &[str]) -> [task_id] {
         ret tasks;
     }
 
-    fn map_task(ctrl: _chan[ctrl_proto], input: str) {
+    fn map_task(ctrl: _chan<ctrl_proto>, input: str) {
         // log_err "map_task " + input;
         let intermediates = map::new_str_hash();
 
-        fn emit(im: &map::hashmap[str, _chan[reduce_proto]],
-                ctrl: _chan[ctrl_proto], key: str, val: int) {
+        fn emit(im: &map::hashmap<str, _chan<reduce_proto>>,
+                ctrl: _chan<ctrl_proto>, key: str, val: int) {
             let c;
             alt im.find(key) {
               some(_c) {
@@ -95,7 +95,7 @@ fn emit(im: &map::hashmap[str, _chan[reduce_proto]],
                 c = _c
               }
               none. {
-                let p = mk_port[_chan[reduce_proto]]();
+                let p = mk_port<_chan<reduce_proto>>();
                 let keyi = str::bytes(key);
                 send(ctrl, find_reducer(keyi, p.mk_chan()));
                 c = p.recv();
@@ -108,7 +108,7 @@ fn emit(im: &map::hashmap[str, _chan[reduce_proto]],
 
         map(input, bind emit(intermediates, ctrl, _, _));
 
-        for each kv: @{key: str, val: _chan[reduce_proto]}  in
+        for each kv: @{key: str, val: _chan<reduce_proto>}  in
                  intermediates.items() {
             send(kv.val, release);
         }
@@ -116,7 +116,7 @@ fn emit(im: &map::hashmap[str, _chan[reduce_proto]],
         send(ctrl, mapper_done);
     }
 
-    fn reduce_task(key: str, out: _chan[_chan[reduce_proto]]) {
+    fn reduce_task(key: str, out: _chan<_chan<reduce_proto>>) {
         let p = mk_port();
 
         send(out, p.mk_chan());
@@ -124,8 +124,8 @@ fn reduce_task(key: str, out: _chan[_chan[reduce_proto]]) {
         let ref_count = 0;
         let is_done = false;
 
-        fn get(p: &_port[reduce_proto], ref_count: &mutable int,
-               is_done: &mutable bool) -> option[int] {
+        fn get(p: &_port<reduce_proto>, ref_count: &mutable int,
+               is_done: &mutable bool) -> option<int> {
             while !is_done || ref_count > 0 {
                 alt p.recv() {
                   emit_val(v) {
@@ -147,12 +147,12 @@ fn get(p: &_port[reduce_proto], ref_count: &mutable int,
     }
 
     fn map_reduce(inputs: &[str]) {
-        let ctrl = mk_port[ctrl_proto]();
+        let ctrl = mk_port<ctrl_proto>();
 
         // This task becomes the master control task. It task::_spawns
         // to do the rest.
 
-        let reducers: map::hashmap[str, _chan[reduce_proto]];
+        let reducers: map::hashmap<str, _chan<reduce_proto>>;
 
         reducers = map::new_str_hash();
 
@@ -189,7 +189,7 @@ fn map_reduce(inputs: &[str]) {
             }
         }
 
-        for each kv: @{key: str, val: _chan[reduce_proto]} in reducers.items()
+        for each kv: @{key: str, val: _chan<reduce_proto>} in reducers.items()
                  {
             send(kv.val, done);
         }
@@ -225,7 +225,7 @@ fn main(argv: [str]) {
     log_err "MapReduce completed in " + u64::str(elapsed) + "ms";
 }
 
-fn read_word(r: io::reader) -> option[str] {
+fn read_word(r: io::reader) -> option<str> {
     let w = "";
 
     while !r.eof() {
index 86fc40027f9b943a1857053025ca53084511e37b..7c97308c5387c8d06a35feae7dfbebfcbe0f1ae1 100644 (file)
@@ -2,4 +2,4 @@
 
 mod m1 { }
 
-fn main(args: [str]) { log m1::a; }
\ No newline at end of file
+fn main(args: [str]) { log m1::a; }
index 9216c000fbfbaa4a24ce356af9601f16b11a4823..e6596f17b6e05a55530d87a0ad83070fbe3de820 100644 (file)
@@ -4,4 +4,4 @@ mod m1 {
     mod a { }
 }
 
-fn main(args: [str]) { log m1::a; }
\ No newline at end of file
+fn main(args: [str]) { log m1::a; }
index b3c5c21d0ef058f111d167226505958abc9ba091..1a710c06f91ca05c8c5637e6259a3aa7fe2faa74 100644 (file)
@@ -3,7 +3,7 @@
 import std::map::hashmap;
 import std::bitv;
 
-type fn_info = {vars: hashmap[uint, var_info]};
+type fn_info = {vars: hashmap<uint, var_info>};
 type var_info = {a: uint, b: uint};
 
 fn bitv_to_str(enclosing: fn_info, v: bitv::t) -> str {
index 7503a7df91f68f2efcb62a59e82b95adc27e45df..f4375eaade38523bc791601acfdeadd24834ad0b 100644 (file)
@@ -4,4 +4,4 @@
 mod zed {
     fn bar() { log "bar"; }
 }
-fn main(args: [str]) { bar(); }
\ No newline at end of file
+fn main(args: [str]) { bar(); }
index 2449377f785982af7e5e26cbacf43d522a0cb20f..89532f61fb1a68f6cefc33782c3af3cd5b476bf5 100644 (file)
@@ -4,4 +4,4 @@ mod baz { }
 mod zed {
     fn bar() { log "bar3"; }
 }
-fn main(args: [str]) { bar(); }
\ No newline at end of file
+fn main(args: [str]) { bar(); }
index 0f8fdcf26360ad93edd851a309aa958844aa8058..680804c97b043fd15244df5388aca0f8facb34c7 100644 (file)
@@ -1,4 +1,4 @@
 // error-pattern: unresolved modulename
 import main::bar;
 
-fn main(args: [str]) { log "foo"; }
\ No newline at end of file
+fn main(args: [str]) { log "foo"; }
index 65d8893177fc583b97c7d0782d176c278fdd1b97..6daed215ddb534f078aed8ae685622dad7a961c3 100644 (file)
@@ -3,4 +3,4 @@
 import zed::bar;
 import bar::zed;
 
-fn main(args: [str]) { log "loop"; }
\ No newline at end of file
+fn main(args: [str]) { log "loop"; }
index 1bc565cf5350c8261cf73db40add3cb05f85399a..c41c9fb388146104eaaf5746e88a7ae6640fcc60 100644 (file)
@@ -3,4 +3,4 @@
 
 type x = [x];
 
-fn main() { let b: x = ~[]; }
\ No newline at end of file
+fn main() { let b: x = ~[]; }
index 99e762f84596c1ad62fd4957baf8509026ca0d58..609a850cafa066e906e54b763dbea3af526528e0 100644 (file)
@@ -1,5 +1,6 @@
 // error-pattern:Attempt to use a type argument out of scope
 fn hd[U](v: &[U]) -> U {
     fn hd1(w: &[U]) -> U { ret w.(0); }
+
     ret hd1(v);
-}
\ No newline at end of file
+}
index e1ead1d79a5be8af053496171cd0eee99b1eeb4b..ead40e3948ee8f1710e55d215801b25e8710e610 100644 (file)
@@ -6,8 +6,8 @@
 
 // error-pattern: mismatched types
 
-tag bar { t1((), option::t[[int]]); t2; }
+tag bar { t1((), option::t<[int]>); t2; }
 
 fn foo(t: bar) -> int { alt t { t1(_, some(x)) { ret x * 3; } _ { fail; } } }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 6f8c24be9ae2cefb7064be25bd2c4cd4c95a5046..cd5d0ffc290b7335172f4c2960b6de87fb16f6b7 100644 (file)
@@ -5,8 +5,8 @@
 
 // error-pattern: mismatched types
 
-tag bar { t1((), option::t[[int]]); t2; }
+tag bar { t1((), option::t<[int]>); t2; }
 
 fn foo(t: bar) { alt t { t1(_, some[int](x)) { log x; } _ { fail; } } }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 58ede2bba6cba792471819a26e6fa589e0ba9469..10a222f5cd01720aa892427c8db58f750b5e36eb 100644 (file)
@@ -6,4 +6,4 @@ fn f() {
     log v.some_field_name; //type error
 }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 9c0938c0dfb59d912ad710aae801e30d42e330f6..7397773d94011a55cc77df79a3e48c5eaa40870a 100644 (file)
@@ -2,4 +2,4 @@
 
 fn test() { let w: [int]; w.(5) = 0; }
 
-fn main() { test(); }
\ No newline at end of file
+fn main() { test(); }
index cbb68d50f767ef1b0393ae1156551fb44ff52f53..d800288dd9282dbb6e16cc8c431297acf0de2fce 100644 (file)
@@ -1,2 +1,2 @@
 // error-pattern:assignment to immutable vec content
-fn main() { let v: [int] = ~[1, 2, 3]; v.(1) = 4; }
\ No newline at end of file
+fn main() { let v: [int] = ~[1, 2, 3]; v.(1) = 4; }
index f5a60bd0261bb24e504c1e69cfb36c80048343bb..85b7be9b00f3f2e923211db4e42b71a409ace04e 100644 (file)
     // Run ignored tests
     run_ignored: bool,
     // Only run tests that match this filter
-    filter: option::t[str],
+    filter: option::t<str>,
     // A command line to prefix program execution with,
     // for running under valgrind
-    runtool: option::t[str],
+    runtool: option::t<str>,
     // Flags to pass to the compiler
-    rustcflags: option::t[str],
+    rustcflags: option::t<str>,
     // Explain what's going on
     verbose: bool
 };
index d3d44b007546c587a2cea32e747df7bd1233d31d..c147e676de3217a8875cca4da8f7cece161b0797 100644 (file)
@@ -81,11 +81,11 @@ fn log_config(config: &config) {
     logv(c, #fmt("\n"));
 }
 
-fn opt_str(maybestr: option::t[str]) -> str {
+fn opt_str(maybestr: option::t<str>) -> str {
     alt maybestr { option::some(s) { s } option::none. { "(none)" } }
 }
 
-fn str_opt(maybestr: str) -> option::t[str] {
+fn str_opt(maybestr: str) -> option::t<str> {
     if maybestr != "(none)" { option::some(maybestr) } else { option::none }
 }
 
@@ -125,7 +125,7 @@ fn test_opts(config: &config) -> test::test_opts {
 
 fn make_tests(cx: &cx) -> tests_and_conv_fn {
     log #fmt("making tests from %s", cx.config.src_base);
-    let configport = mk_port[[u8]]();
+    let configport = mk_port<[u8]>();
     let tests = ~[];
     for file: str in fs::list_dir(cx.config.src_base) {
         log #fmt("inspecting file %s", file);
@@ -158,7 +158,7 @@ fn is_test(config: &config, testfile: &str) -> bool {
     ret valid;
 }
 
-fn make_test(cx: &cx, testfile: &str, configport: &_port[[u8]]) ->
+fn make_test(cx: &cx, testfile: &str, configport: &_port<[u8]>) ->
    test::test_desc {
     {name: make_test_name(cx.config, testfile),
      fn: make_test_closure(testfile, configport.mk_chan()),
@@ -188,12 +188,12 @@ fn make_test_name(config: &config, testfile: &str) -> str {
 Really convoluted. Need to think up of a better definition for tests.
 */
 
-fn make_test_closure(testfile: &str, configchan: _chan[[u8]]) -> test::test_fn
+fn make_test_closure(testfile: &str, configchan: _chan<[u8]>) -> test::test_fn
 {
     bind send_config(testfile, configchan)
 }
 
-fn send_config(testfile: str, configchan: _chan[[u8]]) {
+fn send_config(testfile: str, configchan: _chan<[u8]>) {
     send(configchan, str::bytes(testfile));
 }
 
@@ -207,7 +207,7 @@ fn send_config(testfile: str, configchan: _chan[[u8]]) {
 function.
 */
 
-fn closure_to_task(cx: cx, configport: _port[[u8]], testfn: &fn() ) -> task_id
+fn closure_to_task(cx: cx, configport: _port<[u8]>, testfn: &fn() ) -> task_id
 {
     testfn();
     let testfile = configport.recv();
index 4d8855680089f9029a41f1fb7bfa7a05da6a9a9c..81288f245a7d76f53dea999be9ff9c196433cedb 100644 (file)
     // Lines that should be expected, in order, on standard out
     error_patterns: [str],
     // Extra flags to pass to the compiler
-    compile_flags: option::t[str],
+    compile_flags: option::t<str>,
     // If present, the name of a file that this test should match when
     // pretty-printed
-    pp_exact: option::t[str],
+    pp_exact: option::t<str>,
     // FIXME: no-valgrind is a temporary directive until all of run-fail
     // is valgrind-clean
     no_valgrind: bool
@@ -82,15 +82,15 @@ fn is_test_ignored(config: &config, testfile: &str) -> bool {
     }
 }
 
-fn parse_error_pattern(line: &str) -> option::t[str] {
+fn parse_error_pattern(line: &str) -> option::t<str> {
     parse_name_value_directive(line, "error-pattern")
 }
 
-fn parse_compile_flags(line: &str) -> option::t[str] {
+fn parse_compile_flags(line: &str) -> option::t<str> {
     parse_name_value_directive(line, "compile-flags")
 }
 
-fn parse_pp_exact(line: &str, testfile: &str) -> option::t[str] {
+fn parse_pp_exact(line: &str, testfile: &str) -> option::t<str> {
     alt parse_name_value_directive(line, "pp-exact") {
       option::some(s) { option::some(s) }
       option::none. {
@@ -108,7 +108,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
 }
 
 fn parse_name_value_directive(line: &str,
-                              directive: &str) -> option::t[str] {
+                              directive: &str) -> option::t<str> {
     let keycolon = directive + ":";
     if str::find(line, keycolon) >= 0 {
         let colon = str::find(line, keycolon) as uint;
index 2c39ab377ca35fc07aadb52ddf9411dc57c16dc3..c90dd6a94ba147448d6b1226cf7e0abed42ef738 100644 (file)
 export close;
 export reqchan;
 
-type reqchan = _chan[request];
+type reqchan = _chan<request>;
 
-type handle = {task: option::t[task_id], chan: reqchan};
+type handle = {task: option::t<task_id>, chan: reqchan};
 
 tag request {
-    exec([u8], [u8], [[u8]], _chan[response]);
+    exec([u8], [u8], [[u8]], _chan<response>);
     stop;
 }
 
@@ -39,7 +39,7 @@
 
 fn mk() -> handle {
     let setupport = mk_port();
-    let task = task::_spawn(bind fn(setupchan: _chan[_chan[request]]) {
+    let task = task::_spawn(bind fn(setupchan: _chan<_chan<request>>) {
         let reqport = mk_port();
         let reqchan = reqport.mk_chan();
         send(setupchan, reqchan);
@@ -58,9 +58,9 @@ fn close(handle: &handle) {
 }
 
 fn run(handle: &handle, lib_path: &str,
-       prog: &str, args: &[str], input: &option::t[str]) ->
+       prog: &str, args: &[str], input: &option::t<str>) ->
 {status: int, out: str, err: str} {
-    let p = mk_port[response]();
+    let p = mk_port<response>();
     let ch = p.mk_chan();
     send(handle.chan, exec(str::bytes(lib_path),
                            str::bytes(prog),
@@ -75,7 +75,7 @@ fn run(handle: &handle, lib_path: &str,
     ret {status: status, out: output, err: errput};
 }
 
-fn writeclose(fd: int, s: &option::t[str]) {
+fn writeclose(fd: int, s: &option::t<str>) {
     if option::is_some(s) {
         let writer = io::new_writer(
             io::fd_buf_writer(fd, option::none));
@@ -99,7 +99,7 @@ fn readclose(fd: int) -> str {
     ret buf;
 }
 
-fn worker(p: _port[request]) {
+fn worker(p: _port<request>) {
 
     // FIXME (787): If we declare this inside of the while loop and then
     // break out of it before it's ever initialized (i.e. we don't run
index f5bcd8c9623db615faa0abd8148ab9eb5f33b991..9fd344c4a377f907120b6679f1788fe2691c240b 100644 (file)
@@ -236,7 +236,7 @@ fn exec_compiled_test(cx: &cx, props: &test_props,
 fn compose_and_run(cx: &cx, testfile: &str,
                    make_args: fn(&config, &str) -> procargs ,
                    lib_path: &str,
-                   input: option::t[str]) -> procres {
+                   input: option::t<str>) -> procres {
     let procargs = make_args(cx.config, testfile);
     ret program_output(cx, testfile, lib_path,
                        procargs.prog, procargs.args,
@@ -271,9 +271,9 @@ fn make_run_args(config: &config,
     ret {prog: args.(0), args: vec::slice(args, 1u, vec::len(args))};
 }
 
-fn split_maybe_args(argstr: &option::t[str]) -> [str] {
+fn split_maybe_args(argstr: &option::t<str>) -> [str] {
     fn rm_whitespace(v: &[str]) -> [str] {
-        fn flt(s: &str) -> option::t[str] {
+        fn flt(s: &str) -> option::t<str> {
             if !is_whitespace(s) {
                 option::some(s)
             } else {
@@ -298,7 +298,7 @@ fn is_whitespace(s: str) -> bool {
 }
 
 fn program_output(cx: &cx, testfile: &str, lib_path: &str, prog: &str,
-                  args: &[str], input: option::t[str]) -> procres {
+                  args: &[str], input: option::t<str>) -> procres {
     let cmdline =
     {
         let cmdline = make_cmdline(lib_path, prog, args);
index 2ecf7a7c29e38379eefbe0950ebc1f3b29bf0513..048c72b3458cbc50c0f027639012a18516db4b7e 100644 (file)
@@ -1,5 +1,5 @@
 // error-pattern:quux
-fn test00_start(ch: chan_t[int], message: int) {
+fn test00_start(ch: chan_t<int>, message: int) {
     send(ch, message);
 }
 
@@ -11,6 +11,6 @@ fn test00_start(ch: chan_t[int], message: int) {
     port : port_id
 };
 
-fn send[~T](ch : chan_t[T], data : -T) { fail; }
+fn send[~T](ch : chan_t<T>, data : -T) { fail; }
 
 fn main() { fail "quux"; }
index bacb7f9effc4a3dcde8110feaf10622dfc42c8c1..863ae4034c142915df216e32ad91d06d78e2f562 100644 (file)
@@ -4,7 +4,7 @@
 import std::comm::mk_port;
 import std::comm::send;
 
-fn echo[~T](c: _chan[T], oc: _chan[_chan[T]]) {
+fn echo[~T](c: _chan<T>, oc: _chan<_chan<T>>) {
     // Tests that the type argument in port gets
     // visited
     let p = mk_port[T]();
index 3a2406c389d1897bdb03e8f90008d89f31c59a87..5e551eca127f123e3cdf4ec33546030b98719603 100644 (file)
@@ -2,7 +2,7 @@
 // xfail-stage2
 // xfail-stage3
 io fn main() {
-    let port[int] po = port();
+    let port<int> po = port();
 
     // Spawn 10 tasks each sending us back one int.
     let int i = 10;
@@ -26,7 +26,7 @@
     log "main thread exiting";
 }
 
-io fn child(int x, chan[int] ch) {
+io fn child(int x, chan<int> ch) {
     log x;
     ch <| x;
 }
index 685a905509cdbad2956456fad12836947c6975a6..9c77d5a9c4e533b4b6eaaccbb4aa5c2aa311557f 100644 (file)
@@ -6,10 +6,10 @@
   This program should hang on the po |> r line.
  */
 fn main() {
-    let po: port[int] = port();
-    let ch: chan[int] = chan(po);
+    let po: port<int> = port();
+    let ch: chan<int> = chan(po);
     let r;
     po |> r;
     ch <| 42;
     log_err r;
-}
\ No newline at end of file
+}
index b5552c61407b2bf467d9bca5c1534b3efb8990e8..28349f27a507b123a2a5bddf7174d9061db922c8 100644 (file)
@@ -9,4 +9,4 @@ fn main() {
     // Bounds-check failure.
 
     assert (v.(x + 2) == 20);
-}
\ No newline at end of file
+}
index 1c8a6ebd5c4e7df840dd40e738cdefe57fac2f06..41eb94ca73975b3ab8bcc57395f352f66b040d7a 100644 (file)
@@ -9,4 +9,4 @@ fn main() {
     // Bounds-check failure.
 
     assert (v.(x - 1) == 20);
-}
\ No newline at end of file
+}
index 0861b66aab86e595ae6f143aa4af769d3b0d2b05..6eb011484db68ef785af8551398851d916c05244 100644 (file)
@@ -7,7 +7,7 @@
 import std::comm;
 import std::task;
 
-fn f(c: comm::_chan[int]) {
+fn f(c: comm::_chan<int>) {
     type t = {_0: int, _1: int, _2: int};
 
     // Allocate a box.
@@ -38,4 +38,4 @@ fn main() {
     i = p.recv();
 
     log "parent exiting, killing child";
-}
\ No newline at end of file
+}
index 564217ba092b48ca308f6bb864d1fee04ba4efde..b3cb9d0a374ff0bbf4e04109957b56032aaa0094 100644 (file)
@@ -7,10 +7,10 @@
 
 tag sty { ty_nil; }
 
-type raw_t = {struct: sty, cname: option::t[str], hash: uint};
+type raw_t = {struct: sty, cname: option::t<str>, hash: uint};
 
-fn mk_raw_ty(st: sty, cname: &option::t[str]) -> raw_t {
+fn mk_raw_ty(st: sty, cname: &option::t<str>) -> raw_t {
     ret {struct: st, cname: cname, hash: 0u};
 }
 
-fn main() { mk_raw_ty(ty_nil, none[str]); }
\ No newline at end of file
+fn main() { mk_raw_ty(ty_nil, none[str]); }
index f2b81d41b0b156e3996beed5562b49c12371eea9..ae1f550967898cfc99d3896fe17f416c1bee3f34 100644 (file)
@@ -1,7 +1,7 @@
 tag option[T] { some(T); none; }
 
-type r[T] = {mutable v: [option[T]]};
+type r[T] = {mutable v: [option<T>]};
 
 fn f[T]() -> [T] { ret ~[]; }
 
-fn main() { let r: r[int] = {mutable v: ~[]}; r.v = f(); }
+fn main() { let r: r<int> = {mutable v: ~[]}; r.v = f(); }
index 7b90287d9d41e41432ab83c83d4555c85f10a47d..471d2fd58fbdccf5baf9e3be8f75421010292ff2 100644 (file)
@@ -5,7 +5,7 @@
 import std::option::none;
 import std::option::some;
 
-fn foo[T](y: &option::t[T]) {
+fn foo[T](y: &option::t<T>) {
     let x: int;
     let rs: [int] = ~[];
     /* tests that x doesn't get put in the precondition for the
@@ -16,4 +16,4 @@ fn foo[T](y: &option::t[T]) {
     ret;
 }
 
-fn main() { log "hello"; foo[int](some[int](5)); }
\ No newline at end of file
+fn main() { log "hello"; foo[int](some[int](5)); }
index e158b1ca64c5866c06fb89188de1d655ecf87d7b..910377e4008782df5790698c6b43cae812ea63b5 100644 (file)
@@ -1,7 +1,7 @@
 tag maybe[T] { nothing; just(T); }
 
-fn foo(x: maybe[int]) {
+fn foo(x: maybe<int>) {
     alt x { nothing. { log_err "A"; } just(a) { log_err "B"; } }
 }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 884fd053adb900e5afc11f05f4e7142d2db44ee1..8f0a58772315660acbb3a4aa6b0f094981ddbaed 100644 (file)
@@ -6,7 +6,7 @@
 import std::comm::send;
 import std::task;
 
-fn a(c: _chan[int]) { send(c, 10); }
+fn a(c: _chan<int>) { send(c, 10); }
 
 fn main() {
     let p = mk_port();
@@ -18,7 +18,7 @@ fn main() {
     //    log "Finished.";
 }
 
-fn b(c: _chan[int]) {
+fn b(c: _chan<int>) {
     //    log "task b0";
     //    log "task b1";
     //    log "task b2";
@@ -26,4 +26,4 @@ fn b(c: _chan[int]) {
     //    log "task b4";
     //    log "task b5";
     send(c, 10);
-}
\ No newline at end of file
+}
index 6e600fac978591188df63b7f45d1e50b86d05909..88c5360ccba842f9976ae1356e18f7a0b5d79ac1 100644 (file)
@@ -6,7 +6,7 @@
 import std::comm::_chan;
 import std::task;
 
-fn a(c: _chan[int]) { log "task a0"; log "task a1"; send(c, 10); }
+fn a(c: _chan<int>) { log "task a0"; log "task a1"; send(c, 10); }
 
 fn main() {
     let p = comm::mk_port();
@@ -18,11 +18,11 @@ fn main() {
     log "Finished.";
 }
 
-fn b(c: _chan[int]) {
+fn b(c: _chan<int>) {
     log "task b0";
     log "task b1";
     log "task b2";
     log "task b2";
     log "task b3";
     send(c, 10);
-}
\ No newline at end of file
+}
index eec899b842f9ff4fca8548e576ca95a0f6e6bd88..e51a5b60b4b7169e62f169529eb1c91911117313 100644 (file)
@@ -6,7 +6,7 @@
 import std::comm::_chan;
 import std::task;
 
-fn a(c: _chan[int]) {
+fn a(c: _chan<int>) {
     if true {
         log "task a";
         log "task a";
@@ -36,7 +36,7 @@ fn main() {
     log "children finished, root finishing";
 }
 
-fn b(c: _chan[int]) {
+fn b(c: _chan<int>) {
     if true {
         log "task b";
         log "task b";
@@ -46,4 +46,4 @@ fn b(c: _chan[int]) {
         log "task b";
     }
     send(c, 10);
-}
\ No newline at end of file
+}
index f6f2f5be7e5361fb6ee036db6c23e9e6ab14487b..d84a86bb56975983c76c6d7c2bcbf0c31bfc4014 100644 (file)
@@ -69,7 +69,7 @@ fn test_port() {
 }
 
 fn test_chan() {
-    let p: comm::_port[int] = comm::mk_port();
+    let p: comm::_port<int> = comm::mk_port();
     let ch1 = p.mk_chan();
     let ch2 = p.mk_chan();
 
@@ -114,10 +114,10 @@ fn h(i: int) { }
 }
 
 native "rust" mod native_mod = "" {
-    fn str_byte_len(s: str) -> vec[u8];
+    fn str_byte_len(s: str) -> vec<u8>;
     // This isn't actually the signature of str_alloc, but since
     // we're not calling it that shouldn't matter
-    fn str_alloc(s: str) -> vec[u8];
+    fn str_alloc(s: str) -> vec<u8>;
 }
 
 // FIXME: comparison of native fns
index ef8051a14e13beed173ef930bc9b00219ab8e531..de88a538fee37088f3d02cc20d3a2a138c275676 100644 (file)
@@ -12,4 +12,4 @@ fn foo(acc: int, n: int) {
     if is_odd(n) && length_is_even(some_box(1)) { log_err "bloop"; }
 }
 
-fn main() { foo(67, 5); }
\ No newline at end of file
+fn main() { foo(67, 5); }
index e7da90960a166af0fab7e00acf7e2c1b61112b5b..8b18c36fbed390e1ad0eca61123d8aab7ed4cbac 100644 (file)
@@ -12,4 +12,4 @@ fn foo(acc: int, n: int) {
     if is_odd(n) || length_is_even(some_box(1)) { log_err "bloop"; }
 }
 
-fn main() { foo(67, 5); }
\ No newline at end of file
+fn main() { foo(67, 5); }
index 751d69cd6c8db2863cdb9eddb47466719e3b62d6..4392e01c0a9752d7e63e3694e3e5d66b64f34efa 100644 (file)
@@ -2,11 +2,11 @@
 
 type box[T] = {c: @T};
 
-fn unbox[T](b: &box[T]) -> T { ret *b.c; }
+fn unbox[T](b: &box<T>) -> T { ret *b.c; }
 
 fn main() {
     let foo: int = 17;
-    let bfoo: box[int] = {c: @foo};
+    let bfoo: box<int> = {c: @foo};
     log "see what's in our box";
     assert (unbox[int](bfoo) == foo);
-}
\ No newline at end of file
+}
index 7723eef6d1b2445978ad6b3eadbc2469bb84a190..43ddd80562c3a8126c4f72f19a5385a0c7789247 100644 (file)
@@ -9,12 +9,12 @@
 
 tag request {
   quit;
-  close(_chan[bool]);
+  close(_chan<bool>);
 }
 
-type ctx = _chan[request];
+type ctx = _chan<request>;
 
-fn request_task(c: _chan[ctx]) {
+fn request_task(c: _chan<ctx>) {
     let p = mk_port();
     send(c, p.mk_chan());
     let req: request;
@@ -34,7 +34,7 @@ fn new() -> ctx {
 fn main() {
     let cx = new();
 
-    let p = mk_port[bool]();
+    let p = mk_port<bool>();
     send(cx, close(p.mk_chan()));
     send(cx, quit);
 }
index 4a6516c869ad9de939f7af06ed62b84438d99515..8c203ecd23f008635dc1e7bbef3f79a2deb0fa87 100644 (file)
@@ -15,8 +15,8 @@ fn main() {
     assert (y == 10);
 }
 
-fn child(c: _chan[int]) {
+fn child(c: _chan<int>) {
     log_err "sending";
     send(c, 10);
     log_err "value sent"
-}
\ No newline at end of file
+}
index 5040e6888abf216f8ed67f39195a847f169d3ffc..429bea89771f335fa445a3b326f7b821b6c17835 100644 (file)
@@ -1,3 +1,3 @@
 
 
-fn main(args: [str]) { log args.(0); }
\ No newline at end of file
+fn main(args: [str]) { log args.(0); }
index 85e37f8c445d6231034556820f10580093535915..e4d0526fbc1832c908beceda313b94a8b61c4174 100644 (file)
@@ -84,4 +84,4 @@ mod test_native_items {
         fn str_byte_len(s: str) -> uint;
         fn str_byte_len(s: str) -> uint;
     }
-}
\ No newline at end of file
+}
index e078bef7131aae182254634138ed895df2012c4a..0fab46f07612a55ecb737a39617708de641716e5 100644 (file)
@@ -13,4 +13,4 @@ fn main() {
     send(ch, 11);
     let j = po.recv();
     assert (j == 11);
-}
\ No newline at end of file
+}
index 48a393f42d9d7cab8fe606f19459cb8eb44a878a..de1d84ae1345ffef6fd03b2cf785868af5a6adaa 100644 (file)
@@ -1,3 +1,3 @@
 
 
-fn main() { let v: [mutable int] = ~[mutable ]; }
\ No newline at end of file
+fn main() { let v: [mutable int] = ~[mutable ]; }
index e8d52831a2468a3bf6f22945782a1a42b20bbbec..23ec4c9eed3c3a43eb0319d92c0c4f6606d633db 100644 (file)
@@ -2,6 +2,6 @@
 export foo;
 export main;
 
-tag list_cell[T] { cons(@list_cell[T]); }
+tag list_cell[T] { cons(@list_cell<T>); }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index e4d560d8653d1ceb853227a31c5a9f4e05d40b10..5618c642a7bc5d558cc812a718702ea0d3ee90c1 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(@T, @T) -> bool ;
 
-fn test_generic[T](expected: @T, eq: &compare[T]) {
+fn test_generic[T](expected: @T, eq: &compare<T>) {
     let actual: @T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
@@ -15,4 +15,4 @@ fn test_box() {
     test_generic[bool](@true, eq);
 }
 
-fn main() { test_box(); }
\ No newline at end of file
+fn main() { test_box(); }
index 53750ff59de0d5e9adb54720611afc79111ae7f8..318158485caf82e62082ebbe089967f7cc2ce94b 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(&T, &T) -> bool ;
 
-fn test_generic[T](expected: &T, eq: &compare[T]) {
+fn test_generic[T](expected: &T, eq: &compare<T>) {
     let actual: T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
@@ -15,4 +15,4 @@ fn test_vec() {
     test_generic[@int](@1, eq);
 }
 
-fn main() { test_vec(); }
\ No newline at end of file
+fn main() { test_vec(); }
index 33979e9d30cd9df049d75f3b5c6795a642c6814d..3094331480f29c21a757cf2ac2d8d6eb345f872f 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(&T, &T) -> bool ;
 
-fn test_generic[T](expected: &T, eq: &compare[T]) {
+fn test_generic[T](expected: &T, eq: &compare<T>) {
     let actual: T = alt true { true { expected } };
     assert (eq(expected, actual));
 }
@@ -23,4 +23,4 @@ fn test_rec() {
     test_generic[t]({a: 1, b: 2}, eq);
 }
 
-fn main() { test_bool(); test_rec(); }
\ No newline at end of file
+fn main() { test_bool(); test_rec(); }
index 715043c3c5e3565576268c2ebe0c3a535885b293..66825e5c08e4e93443f0a629f964ebaa6a05930e 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(@T, @T) -> bool ;
 
-fn test_generic[T](expected: @T, eq: &compare[T]) {
+fn test_generic[T](expected: @T, eq: &compare<T>) {
     let actual: @T = { expected };
     assert (eq(expected, actual));
 }
@@ -19,4 +19,4 @@ fn compare_box(b1: @bool, b2: @bool) -> bool {
     test_generic[bool](@true, eq);
 }
 
-fn main() { test_box(); }
\ No newline at end of file
+fn main() { test_box(); }
index 34c1cf833947089fe1cd8405a3030d3159cfa201..b1fd8e51487616618d8ab8a72a84d45d69ccfff3 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(&T, &T) -> bool ;
 
-fn test_generic[T](expected: &T, eq: &compare[T]) {
+fn test_generic[T](expected: &T, eq: &compare<T>) {
     let actual: T = { expected };
     assert (eq(expected, actual));
 }
@@ -15,4 +15,4 @@ fn test_vec() {
     test_generic[@int](@1, eq);
 }
 
-fn main() { test_vec(); }
\ No newline at end of file
+fn main() { test_vec(); }
index 97f92875aca0192044e3807939566d711d8e043c..6a50e2fa33f8c0c6b31f30c4baed63445f198e77 100644 (file)
@@ -6,7 +6,7 @@
 // Tests for standalone blocks as expressions with dynamic type sizes
 type compare[T] = fn(&T, &T) -> bool ;
 
-fn test_generic[T](expected: &T, eq: &compare[T]) {
+fn test_generic[T](expected: &T, eq: &compare<T>) {
     let actual: T = { expected };
     assert (eq(expected, actual));
 }
@@ -25,4 +25,4 @@ fn test_rec() {
     test_generic[t]({a: 1, b: 2}, eq);
 }
 
-fn main() { test_bool(); test_rec(); }
\ No newline at end of file
+fn main() { test_bool(); test_rec(); }
index da78aa47e024c18bfbadbf561ccda9576343a72f..c1cd3985daf65b64faf902d1c359673b89457e3f 100644 (file)
@@ -55,4 +55,4 @@ fn main() {
     test_ret();
     test_372();
     test_nil();
-}
\ No newline at end of file
+}
index 3d1301896ec4fbda381625ee791a7be6373dd83a..8e848c6db75ee3f210522907d225015c8ba4dcbc 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(@T, @T) -> bool ;
 
-fn test_generic[T](expected: @T, not_expected: @T, eq: &compare[T]) {
+fn test_generic[T](expected: @T, not_expected: @T, eq: &compare<T>) {
     let actual: @T = if true { expected } else { not_expected };
     assert (eq(expected, actual));
 }
@@ -15,4 +15,4 @@ fn test_box() {
     test_generic[bool](@true, @false, eq);
 }
 
-fn main() { test_box(); }
\ No newline at end of file
+fn main() { test_box(); }
index fefc3e0d2cfddb6c3de674078382867f1cec4c8d..5f7c87ac78eda572590cb8187a405d3875bd80f9 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 type compare[T] = fn(&T, &T) -> bool ;
 
-fn test_generic[T](expected: &T, not_expected: &T, eq: &compare[T]) {
+fn test_generic[T](expected: &T, not_expected: &T, eq: &compare<T>) {
     let actual: T = if true { expected } else { not_expected };
     assert (eq(expected, actual));
 }
@@ -15,4 +15,4 @@ fn test_vec() {
     test_generic[@int](@1, @2, eq);
 }
 
-fn main() { test_vec(); }
\ No newline at end of file
+fn main() { test_vec(); }
index 4994c07ee0ec722e47a4070ca73a45ab356552d5..40365ef53f923481005bcc8a4d265b182e9c8f5b 100644 (file)
@@ -6,7 +6,7 @@
 // Tests for if as expressions with dynamic type sizes
 type compare[T] = fn(&T, &T) -> bool ;
 
-fn test_generic[T](expected: &T, not_expected: &T, eq: &compare[T]) {
+fn test_generic[T](expected: &T, not_expected: &T, eq: &compare<T>) {
     let actual: T = if true { expected } else { not_expected };
     assert (eq(expected, actual));
 }
@@ -25,4 +25,4 @@ fn test_rec() {
     test_generic[t]({a: 1, b: 2}, {a: 2, b: 3}, eq);
 }
 
-fn main() { test_bool(); test_rec(); }
\ No newline at end of file
+fn main() { test_bool(); test_rec(); }
index cfb33289cf86efe1aaf327e5a794a74207b3ad52..ce75bcde1fd7652fad3ac203d0305901472e88fc 100644 (file)
@@ -4,6 +4,6 @@
     iter foo() -> @{a: K} { put @{a: k}; }
 }
 
-fn x(o: &ob[str]) { for each i: @{a: str} in o.foo() { } }
+fn x(o: &ob<str>) { for each i: @{a: str} in o.foo() { } }
 
 fn main() { let o = ob[str]("hi" + "there"); x(o); }
index 91046c62c04ca6df9fa7b873bcd7870551538532..b49f286d12ba503042dbf755a0529d5f174c4243 100644 (file)
@@ -2,10 +2,10 @@
 
 type recbox[T] = {x: @T};
 
-fn reclift[T](t: &T) -> recbox[T] { ret {x: @t}; }
+fn reclift[T](t: &T) -> recbox<T> { ret {x: @t}; }
 
 fn main() {
     let foo: int = 17;
-    let rbfoo: recbox[int] = reclift[int](foo);
+    let rbfoo: recbox<int> = reclift[int](foo);
     assert (*rbfoo.x == foo);
 }
index 54432be670eacffd9ade1e8b59c199dd98e578a3..53e813c3ccbf04204a50965755ce6e9047bf085b 100644 (file)
@@ -7,7 +7,7 @@
 fn main() {
     type rgb = {x: u8, y: u8, z: u8};
 
-    let h: handle[rgb] = handle[rgb]({x: 1 as u8, y: 2 as u8, z: 3 as u8});
+    let h: handle<rgb> = handle[rgb]({x: 1 as u8, y: 2 as u8, z: 3 as u8});
     log "constructed object";
     log h.get().x;
     log h.get().y;
@@ -15,4 +15,4 @@ fn main() {
     assert (h.get().x == 1 as u8);
     assert (h.get().y == 2 as u8);
     assert (h.get().z == 3 as u8);
-}
\ No newline at end of file
+}
index 76283f4eced91ecd0bddcbd8e6e47922fcc58a25..8e1da513026172e592bc24124873a8219eded3a9 100644 (file)
@@ -11,7 +11,7 @@ fn take2(t: &T) { }
 }
 
 fn main() {
-    let b: buf[int] = buf[int]({_0: 1, _1: 2, _2: 3});
+    let b: buf<int> = buf[int]({_0: 1, _1: 2, _2: 3});
     log "constructed object";
     log b.get(0);
     log b.get(1);
@@ -20,4 +20,4 @@ fn main() {
     assert (b.get(1) == 2);
     assert (b.get(2) == 3);
     b.take2(0);
-}
\ No newline at end of file
+}
index 4e50be94acc594bd509520922d4a6592c9dee99b..92d5c354f00166e8ee180d4c880447902549b28a 100644 (file)
@@ -1,8 +1,8 @@
 
 
-tag list[T] { cons(@T, @list[T]); nil; }
+tag list[T] { cons(@T, @list<T>); nil; }
 
 fn main() {
-    let a: list[int] =
+    let a: list<int> =
         cons[int](@10, @cons[int](@12, @cons[int](@13, @nil[int])));
-}
\ No newline at end of file
+}
index f55cfcaf3371b719ce7d856a509cb10100acf772..4adf719a741530fe74b363d2bd6b8e9c6806d60e 100644 (file)
@@ -2,10 +2,10 @@
 
 tag foo[T] { arm(T); }
 
-fn altfoo[T](f: &foo[T]) {
+fn altfoo[T](f: &foo<T>) {
     let hit = false;
     alt f { arm[T](x) { log "in arm"; hit = true; } }
     assert (hit);
 }
 
-fn main() { altfoo[int](arm[int](10)); }
\ No newline at end of file
+fn main() { altfoo[int](arm[int](10)); }
index 035c34e2c3fd79028cd0b08d7af2ea0cf52d29bd..c85abc4778b5b364860d5d837aa9c07d7e9223c0 100644 (file)
@@ -5,10 +5,10 @@
 tag noption[T] { some(T); }
 
 fn main() {
-    let nop: noption[int] = some[int](5);
+    let nop: noption<int> = some[int](5);
     alt nop { some[int](n) { log n; assert (n == 5); } }
-    let nop2: noption[{x: int, y: int}] = some({x: 17, y: 42});
+    let nop2: noption<{x: int, y: int}> = some({x: 17, y: 42});
     alt nop2 {
       some(t) { log t.x; log t.y; assert (t.x == 17); assert (t.y == 42); }
     }
-}
\ No newline at end of file
+}
index babc08750c98bd9fc8ca810f23d0d28a59bc1bed..a6175646bed10845ee65cef320d95b64d145489c 100644 (file)
@@ -2,4 +2,4 @@
 
 tag option[T] { some(@T); none; }
 
-fn main() { let a: option[int] = some[int](@10); a = none[int]; }
\ No newline at end of file
+fn main() { let a: option<int> = some[int](@10); a = none[int]; }
index b7b720f3a2282105a9081452713c3a45c09fd8c9..a58c86b3e5923c2861f30332bd1b89cce5459c5d 100644 (file)
@@ -2,8 +2,8 @@
 
 type foo[T] = {a: T};
 
-type bar[T] = foo[T];
+type bar[T] = foo<T>;
 
-fn takebar[T](b: &bar[T]) { }
+fn takebar[T](b: &bar<T>) { }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index b480b432277d12b4bb239cfa3889698844f66f23..93aba151eb18682de5cbe73e66b6f3fceddea7cd 100644 (file)
@@ -3,7 +3,7 @@
 type pair[T] = {x: T, y: T};
 
 fn main() {
-    let x: pair[int] = {x: 10, y: 12};
+    let x: pair<int> = {x: 10, y: 12};
     assert (x.x == 10);
     assert (x.y == 12);
-}
\ No newline at end of file
+}
index d5e38519e914bff1908714b9c932bf47378a73fc..7d99ee112a28124109b96c311b9d81e6af44c606 100644 (file)
@@ -30,17 +30,17 @@ mod map_reduce {
 
     type mapper = fn(str, putter) ;
 
-    tag ctrl_proto { find_reducer([u8], _chan[int]); mapper_done; }
+    tag ctrl_proto { find_reducer([u8], _chan<int>); mapper_done; }
 
-    fn start_mappers(ctrl: _chan[ctrl_proto], inputs: &[str]) {
+    fn start_mappers(ctrl: _chan<ctrl_proto>, inputs: &[str]) {
         for i: str in inputs { task::_spawn(bind map_task(ctrl, i)); }
     }
 
-    fn map_task(ctrl: _chan[ctrl_proto], input: str) {
+    fn map_task(ctrl: _chan<ctrl_proto>, input: str) {
 
         let intermediates = map::new_str_hash();
 
-        fn emit(im: &map::hashmap[str, int], ctrl: _chan[ctrl_proto],
+        fn emit(im: &map::hashmap<str, int>, ctrl: _chan<ctrl_proto>,
                 key: str, val: str) {
             let c;
             alt im.find(key) {
@@ -62,12 +62,12 @@ fn emit(im: &map::hashmap[str, int], ctrl: _chan[ctrl_proto],
     }
 
     fn map_reduce(inputs: &[str]) {
-        let ctrl = mk_port[ctrl_proto]();
+        let ctrl = mk_port<ctrl_proto>();
 
         // This task becomes the master control task. It spawns others
         // to do the rest.
 
-        let reducers: map::hashmap[str, int];
+        let reducers: map::hashmap<str, int>;
 
         reducers = map::new_str_hash();
 
index 00e5aca8e1c2186cd638a16996b57a627656bcbb..9e263b734135b433446ed8b78d4e0487ca05f546 100644 (file)
@@ -5,4 +5,4 @@ mod zed {
     fn bar() { log "bar"; }
 }
 
-fn main(args: [str]) { let zed = 42; bar(); }
\ No newline at end of file
+fn main(args: [str]) { let zed = 42; bar(); }
index 0be63b38e079e17c28ff9665f6f04e5781f37d39..9f3ec6d2b459017e6204d9f9606a1bb47024febd 100644 (file)
@@ -7,4 +7,4 @@ mod zed {
     }
 }
 
-fn main(args: [str]) { bar(); }
\ No newline at end of file
+fn main(args: [str]) { bar(); }
index 760a3ff37ca9cbc5bff258087de2a66082c45510..40c3d2357bf3be3ad837c2eeb23735d86f3f2b04 100644 (file)
@@ -12,4 +12,4 @@ mod foo {
         mod zed { }
     }
 }
-fn main(args: [str]) { baz(); }
\ No newline at end of file
+fn main(args: [str]) { baz(); }
index c6909a67fae16f1bff33bdd9f10252c0b504d53f..7b95cfcda670a02d89913a22053264533f1d2107 100644 (file)
@@ -17,4 +17,4 @@ fn main() {
     assert (s.(3u32) == 'd' as u8);
     assert (s.(3i32) == 'd' as u8);
     log s.(3u8);
-}
\ No newline at end of file
+}
index 2aee3ce1a3b58836dabc7a40a7f8351e97977a84..699e730c5fe485bbf36c1e723251edfb75005df8 100644 (file)
@@ -13,9 +13,9 @@
 import std::comm::_chan;
 import std::comm::send;
 
-fn grandchild(c: _chan[int]) { send(c, 42); }
+fn grandchild(c: _chan<int>) { send(c, 42); }
 
-fn child(c: _chan[int]) {
+fn child(c: _chan<int>) {
     let _grandchild = task::_spawn(bind grandchild(c));
     join_id(_grandchild);
 }
@@ -32,4 +32,4 @@ fn main() {
     assert (x == 42);
 
     join_id(_child);
-}
\ No newline at end of file
+}
index b987b11700c0c36905b8ea32e55ab063061a6a73..11731fca56dc472487496a8cde9b3c7015f6df9e 100644 (file)
@@ -9,14 +9,14 @@
 
 tag msg { closed; received([u8]); }
 
-fn producer(c: _chan[[u8]]) {
+fn producer(c: _chan<[u8]>) {
     send(c, ~[1u8, 2u8, 3u8, 4u8]);
     let empty: [u8] = ~[];
     send(c, empty);
 }
 
-fn packager(cb: _chan[_chan[[u8]]], msg: _chan[msg]) {
-    let p: _port[[u8]] = mk_port();
+fn packager(cb: _chan<_chan<[u8]>>, msg: _chan<msg>) {
+    let p: _port<[u8]> = mk_port();
     send(cb, p.mk_chan());
     while true {
         log "waiting for bytes";
@@ -37,12 +37,12 @@ fn packager(cb: _chan[_chan[[u8]]], msg: _chan[msg]) {
 }
 
 fn main() {
-    let p: _port[msg] = mk_port();
-    let recv_reader: _port[_chan[[u8]]] = mk_port();
+    let p: _port<msg> = mk_port();
+    let recv_reader: _port<_chan<[u8]>> = mk_port();
     let pack = task::_spawn(bind packager(recv_reader.mk_chan(),
                                           p.mk_chan()));
 
-    let source_chan: _chan[[u8]] = recv_reader.recv();
+    let source_chan: _chan<[u8]> = recv_reader.recv();
     let prod = task::_spawn(bind producer(source_chan));
 
     while true {
index 85a12599d3917b568aa2c83b263699d5979a84ba..41cc89aed7e89d390ec2bb257f261c0412283ead 100644 (file)
@@ -7,13 +7,13 @@
 import std::comm::mk_port;
 import std::comm::send;
 
-fn producer(c: _chan[[u8]]) {
+fn producer(c: _chan<[u8]>) {
     send(c, ~[1u8, 2u8, 3u8, 4u8, 5u8, 6u8, 7u8,
               8u8, 9u8, 10u8, 11u8, 12u8, 13u8 ]);
 }
 
 fn main() {
-    let p: _port[[u8]] = mk_port();
+    let p: _port<[u8]> = mk_port();
     let prod = task::_spawn(bind producer(p.mk_chan()));
 
     let data: [u8] = p.recv();
index 1f4e283b9f91d355acb9f3da6724fe32be7e3fbf..e36327649bb5b0063bcd0baa9b00a35f24e607a6 100644 (file)
@@ -21,4 +21,4 @@ fn main() {
     assert (y == 10);
 }
 
-fn child(c: _chan[int]) { send(c, 10); }
\ No newline at end of file
+fn child(c: _chan<int>) { send(c, 10); }
index 27fcb963223721f25ba3cec35cbd3816d56d48ef..3413c6a31471b7a0ab32a6a4588721d1b0b49d64 100644 (file)
@@ -4,7 +4,7 @@
 import std::task;
 import std::comm;
 
-fn sub(parent: comm::_chan[int], id: int) {
+fn sub(parent: comm::_chan<int>, id: int) {
   if (id == 0) {
       comm::send(parent, 0);
   } else {
index ecc636e17add7d92b0bb41ee5d6798750452dddc..8e10eb4b71013046e6fe3982513f8ddff20bf38f 100644 (file)
@@ -10,4 +10,4 @@ mod m {
     fn f() -> [int] { vec::init_elt(0, 1u) }
 }
 
-fn main() { let x = m::f(); }
\ No newline at end of file
+fn main() { let x = m::f(); }
index 7d76d4a5d2c4a0ed04b555b802b76f62cce17afb..96e7425d2a5e870698ed263b4b861490b6336a6a 100644 (file)
@@ -13,4 +13,4 @@ fn main() {
     let len = std::vec::len[int](v);
     log len;
     assert (len == 3 as uint);
-}
\ No newline at end of file
+}
index 8c0920208141d6adc751ac04e2e7ec702d32ec98..58dc936083a13084898d0cdcf81d6f01e01b093c 100644 (file)
@@ -3,4 +3,4 @@ fn main() {
     // This just tests whether the vec leaks its members.
     let pvec: [mutable @{a: int, b: int}] =
         ~[mutable @{a: 1, b: 2}, @{a: 3, b: 4}, @{a: 5, b: 6}];
-}
\ No newline at end of file
+}
index cb4be22508fb698401b934ac39e3f44c9f8527c2..060388b12e0a60c97d63362f346b6a0bfc924090 100644 (file)
@@ -15,4 +15,4 @@
 
 native "cdecl" mod baz = "" { }
 
-fn main(args: [str]) { }
\ No newline at end of file
+fn main(args: [str]) { }
index dba2d6a8a3501d2aa63912aaddff17d83b3ee923..4b77fc5f8708bdf634df4b8c4aa933f7e196274d 100644 (file)
@@ -6,7 +6,7 @@
 import std::option::some;
 import std::option::none;
 
-tag t { foo(int, uint); bar(int, option::t[int]); }
+tag t { foo(int, uint); bar(int, option::t<int>); }
 
 fn nested(o: t) {
     alt o {
@@ -15,4 +15,4 @@ fn nested(o: t) {
     }
 }
 
-fn main() { nested(bar(1, none[int])); }
\ No newline at end of file
+fn main() { nested(bar(1, none[int])); }
index 618b012c66a74e6fcdfedcdd0cb5e2ba8e6c54dc..09e138982bef5bcb73f9cd36ca7c44b37f4aa67c 100644 (file)
@@ -1,12 +1,12 @@
 tag myvec[X] = [X];
 
-fn myvec_deref[X](mv: &myvec[X]) -> [X] { ret *mv; }
+fn myvec_deref[X](mv: &myvec<X>) -> [X] { ret *mv; }
 
-fn myvec_elt[X](mv: &myvec[X]) -> X { ret mv.(0); }
+fn myvec_elt[X](mv: &myvec<X>) -> X { ret mv.(0); }
 
 fn main() {
     let mv = myvec(~[1, 2, 3]);
     assert (myvec_deref(mv).(1) == 2);
     assert (myvec_elt(mv) == 1);
     assert (mv.(2) == 3);
-}
\ No newline at end of file
+}
index a7cb03906ed9bc4481ccdcea30b62493bade8227..8d4600d90e85738bea2c869051d9960680cc6fb1 100644 (file)
@@ -47,7 +47,7 @@ fn take(y: int) {
         }
     }
 
-    obj sender(c: _chan[int]) {
+    obj sender(c: _chan<int>) {
         fn take(z: int) {
             send(c, z);
         }
index f46121a26fcd07f2466acbbe7f0a16e3c5a0147c..7e5d16339c070b3b011d4d26d006ac8f371a6934 100644 (file)
@@ -4,10 +4,10 @@
 // -*- rust -*-
 tag clam[T] { signed(int); unsigned(uint); }
 
-fn getclam[T]() -> clam[T] { ret signed[T](42); }
+fn getclam[T]() -> clam<T> { ret signed[T](42); }
 
 obj impatience[T]() {
-    fn moreclam() -> clam[T] { be getclam[T](); }
+    fn moreclam() -> clam<T> { be getclam[T](); }
 }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 2754cae8a94df809b9f45fbd024acdf873fd3203..db4050aaf949273f9a3e53bbf888d337aca48767 100644 (file)
@@ -7,4 +7,4 @@ fn main() {
     let b = buf(~[1 as u8, 2 as u8, 3 as u8]);
     log b.get(1);
     assert (b.get(1) == 2 as u8);
-}
\ No newline at end of file
+}
index 2b3a17ed86d256329272051a67a978525d758f34..4fe43d181218c67c04e8fc156abd25fa67e6a7ad 100644 (file)
@@ -4,4 +4,4 @@ mod foo {
     fn bar(offset: uint) { }
 }
 
-fn main(args: [str]) { foo::bar(0u); }
\ No newline at end of file
+fn main(args: [str]) { foo::bar(0u); }
index 84d9d429af8f63cfc15667fee21d7ae9549df446..4fc67429e2c50336b8343c3e28ea1f8ada6fa880 100644 (file)
@@ -3,7 +3,7 @@
 // xfail-stage3
 // This checks that preemption works.
 
-fn starve_main(alive: chan[int]) {
+fn starve_main(alive: chan<int>) {
     log "signalling main";
     alive <| 1;
     log "starving main";
@@ -12,7 +12,7 @@ fn starve_main(alive: chan[int]) {
 }
 
 fn main() {
-    let alive: port[int] = port();
+    let alive: port<int> = port();
     log "main started";
     let s: task = spawn starve_main(chan(alive));
     let i: int;
@@ -21,4 +21,4 @@ fn main() {
     log "main got alive signal";
     while i < 50 { log "main iterated"; i += 1; }
     log "main completed";
-}
\ No newline at end of file
+}
index 8e2c3035045f40df8ed23c4c4229aaaf7192eefd..9a191b4d07472d0c7434a155b4b5e380c18b0168 100644 (file)
@@ -9,7 +9,7 @@
 
 tag option[T] { none; some(T); }
 
-fn sink(res: option[close_res]) {}
+fn sink(res: option<close_res>) {}
 
 fn main() {
     let c = @mutable true;
index 8eced8d433fa7dc207c079f50acc958b3f834209..1d0d4fbc396a02ae5fdcc848262fa1ce9c4a1f43 100644 (file)
@@ -2,6 +2,6 @@
 
 tag option[T] { none; some(T); }
 
-fn f[T]() -> option[T] { ret none; }
+fn f[T]() -> option<T> { ret none; }
 
-fn main() { f[int](); }
\ No newline at end of file
+fn main() { f[int](); }
index 11b67593bd6c272149361bbdf162afa5f75b9835..cfd946e86afd54520d3d0e9f1ca0acc36a6d7667 100644 (file)
@@ -28,7 +28,7 @@ fn test_init() {
 // Dump lots of items into the channel so it has to grow.
 // Don't trigger any assertions.
 fn test_grow() {
-    let myport: comm::_port[record] = comm::mk_port();
+    let myport: comm::_port<record> = comm::mk_port();
     let mychan = myport.mk_chan();
     for each i: uint  in uint::range(0u, 100u) {
         let val: record = {val1: 0u32, val2: 0u32, val3: 0u32};
index c689c479bacd1c76b735b3a454303bbbe13e4896..92cff8ba8c437b158d88e69b3ab9bad4f0b06d78 100644 (file)
@@ -6,8 +6,8 @@
 // tests that ctrl's type gets inferred properly
 type command[K, V] = {key: K, val: V};
 
-fn cache_server[K, V](c: _chan[_chan[command[K, V]]]) {
-    let ctrl = mk_port[_chan[command[K, V]]]();
+fn cache_server[K, V](c: _chan<_chan<command<K, V>>>) {
+    let ctrl = mk_port[_chan<command<K, V>>]();
     send(c, ctrl.mk_chan());
 }
-fn main() { }
\ No newline at end of file
+fn main() { }
index 7c4e0990290103990e0f02744888ab9be197cbe5..85db2e44cf5f36f5c32b4bdc33a1f3358a371dab 100644 (file)
@@ -4,7 +4,7 @@
 // -*- rust -*-
 tag clam[T] { a(T, int); b; }
 
-fn uhoh[T](v: &[clam[T]]) {
+fn uhoh[T](v: &[clam<T>]) {
     alt v.(1) {
       a[T](t, u) { log "incorrect"; log u; fail; }
       b[T]. { log "correct"; }
@@ -12,6 +12,6 @@ fn uhoh[T](v: &[clam[T]]) {
 }
 
 fn main() {
-    let v: [clam[int]] = ~[b[int], b[int], a[int](42, 17)];
+    let v: [clam<int>] = ~[b[int], b[int], a[int](42, 17)];
     uhoh[int](v);
-}
\ No newline at end of file
+}
index 029c18350d3ee02f7dfe8dd650840c4a52031fdb..310fe5d3769ddcda0e0186f5a7e7f5b36a0b8b7b 100644 (file)
 import std::comm;
 import std::task;
 
-type ctx = comm::_chan[int];
+type ctx = comm::_chan<int>;
 
 fn iotask(cx: ctx, ip: str) { assert (str::eq(ip, "localhost")); }
 
 fn main() {
-    let p = comm::mk_port[int]();
+    let p = comm::mk_port<int>();
     task::_spawn(bind iotask(p.mk_chan(), "localhost"));
 }
index a3c49f3bc47d85295ee4615d6326619e6220872b..943c9a49b3a20c040a2eab1c5841987e5d305650 100644 (file)
@@ -9,4 +9,4 @@ fn main() {
     n <-> a.(0);
     assert (a.(0) == 42);
     assert (n == 0);
-}
\ No newline at end of file
+}
index a553103bbd404f47c9e70c3945e48418f4db9d24..d76ee9ed12ae34cc72e03f859691df14d039706b 100644 (file)
@@ -6,4 +6,4 @@ fn zed(z: bar) { }
     fn baz() { zed(nil); }
 }
 
-fn main(args: [str]) { }
\ No newline at end of file
+fn main(args: [str]) { }
index f4bbb1faaea47f4fe62baee1b3169ef32c9c3a0c..f49c2088b79f0801cf6c5b20adb16382930d156b 100644 (file)
@@ -9,7 +9,7 @@
 
 fn main() { test05(); }
 
-fn test05_start(ch : _chan[int]) {
+fn test05_start(ch : _chan<int>) {
     log_err ch;
     send(ch, 10);
     log_err "sent 10";
@@ -20,7 +20,7 @@ fn test05_start(ch : _chan[int]) {
 }
 
 fn test05() {
-    let po = comm::mk_port[int]();
+    let po = comm::mk_port<int>();
     let ch = po.mk_chan();
     task::_spawn(bind test05_start(ch));
     let value = po.recv();
index 50b87bea511704d914e07ddab3f770f0ded700ee..0eba64299696a938e7b9f68e4e4b0943b698e5a9 100644 (file)
@@ -9,8 +9,8 @@
 import std::task;
 import std::comm;
 
-fn start(c: comm::_chan[str]) {
-    let p = comm::mk_port[str]();
+fn start(c: comm::_chan<str>) {
+    let p = comm::mk_port<str>();
     c.send(p.mk_chan().unsafe_ptr());
 
     let a;
index 82f896837cf6bc7857282f0581895e7dd511b520..50b1e9c7f02bde13c05954919b7309632e072ef8 100644 (file)
@@ -3,13 +3,13 @@
 import std::comm;
 import std::task;
 
-fn start(c: comm::_chan[comm::_chan[int]]) {
-    let p : comm::_port[int] = comm::mk_port();
+fn start(c: comm::_chan<comm::_chan<int>>) {
+    let p : comm::_port<int> = comm::mk_port();
     comm::send(c, p.mk_chan());
 }
 
 fn main() {
-    let p = comm::mk_port[comm::_chan[int]]();
+    let p = comm::mk_port<comm::_chan<int>>();
     let child = task::_spawn(bind start(p.mk_chan()));
     let c = p.recv();
 }
index 64f11a41421e4e50d04a48f5387b91db3ffc7d3c..2ae80750f45e90be2b635e057f4adc988f62babb 100644 (file)
@@ -3,14 +3,14 @@
 import std::comm;
 import std::comm::send;
 
-fn start(c: comm::_chan[int], start: int, number_of_messages: int) {
+fn start(c: comm::_chan<int>, start: int, number_of_messages: int) {
     let i: int = 0;
     while i < number_of_messages { send(c, start + i); i += 1; }
 }
 
 fn main() {
     log "Check that we don't deadlock.";
-    let p : comm::_port[int] = comm::mk_port();
+    let p : comm::_port<int> = comm::mk_port();
     let a = task::_spawn(bind start(p.mk_chan(), 0, 10));
     task::join_id(a);
     log "Joined task";
index 697edfff41fa2d17395c9402a37e2f495caa9237..f7fc38724a194a86d644ca96a4bcd812e0e039ef 100644 (file)
@@ -6,18 +6,18 @@
 import std::comm;
 import std::task;
 
-fn start(c : comm::_chan[int], n: int) {
+fn start(c : comm::_chan<int>, n: int) {
     let i: int = n;
 
     while i > 0 { comm::send(c, 0); i = i - 1; }
 }
 
 fn main() {
-    let p = comm::mk_port[comm::_chan[int]]();
+    let p = comm::mk_port<comm::_chan<int>>();
     // Spawn a task that sends us back messages. The parent task
     // is likely to terminate before the child completes, so from
     // the child's point of view the receiver may die. We should
     // drop messages on the floor in this case, and not crash!
     let child = task::_spawn(bind start(p.mk_chan(), 10));
     let c = p.recv();
-}
\ No newline at end of file
+}
index e6cc8a40882e41524407c4bf4ad06c8f255db28f..ac3430aec3fa1cfec82e7b368a8f4cc88cad7f6b 100644 (file)
@@ -9,7 +9,7 @@
 
 fn main() { log "===== WITHOUT THREADS ====="; test00(); }
 
-fn test00_start(ch: _chan[int], message: int, count: int) {
+fn test00_start(ch: _chan<int>, message: int, count: int) {
     log "Starting test00_start";
     let i: int = 0;
     while i < count {
index 42c4e05c06001e74bf812d14778737edb9275915..0acff8cc022b993c9ca073c66e86338ae07d5a6f 100644 (file)
@@ -4,7 +4,7 @@
 
 fn main() { test00(); }
 
-fn test00_start(c: comm::_chan[int], start: int, number_of_messages: int) {
+fn test00_start(c: comm::_chan<int>, start: int, number_of_messages: int) {
     let i: int = 0;
     while i < number_of_messages { comm::send(c, start + i); i += 1; }
 }
@@ -47,4 +47,4 @@ fn test00() {
     task::join_id(t3);
 
     assert (sum == number_of_messages * 4 * (number_of_messages * 4 - 1) / 2);
-}
\ No newline at end of file
+}
index 8917f72157d0a7e67c9b59cfc1ea94fef55331ee..649e23f9806c32ce8a31faadddce399c383739a8 100644 (file)
@@ -4,7 +4,7 @@
 
 fn main() { test00(); }
 
-fn test00_start(c : comm::_chan[int], start: int, number_of_messages: int) {
+fn test00_start(c : comm::_chan<int>, start: int, number_of_messages: int) {
     let i: int = 0;
     while i < number_of_messages { comm::send(c, start + i); i += 1; }
 }
@@ -47,4 +47,4 @@ fn test00() {
     task::join_id(t3);
 
     assert (sum == number_of_messages * 4 * (number_of_messages * 4 - 1) / 2);
-}
\ No newline at end of file
+}
index 27ac300c1178c4e21140eec7021e6e4cb91ffc88..a197ebdf5074b7969e7a1f683e47ef27806bb12e 100644 (file)
@@ -4,7 +4,7 @@
 
 fn main() { test00(); }
 
-fn test00_start(c: comm::_chan[int], number_of_messages: int) {
+fn test00_start(c: comm::_chan<int>, number_of_messages: int) {
     let i: int = 0;
     while i < number_of_messages { comm::send(c, i+0); i += 1; }
 }
index be8018d4278687cf4b427fb5730298b352f745a7..1e0d10001d0084f30c2caa0922d86cc6abbb9ad3 100644 (file)
@@ -7,9 +7,9 @@
 // any size, but rustc currently can because they do have size. Whether
 // or not this is desirable I don't know, but here's a regression test.
 fn main() {
-    let po: comm::_port[()] = comm::mk_port();
-    let ch: comm::_chan[()] = po.mk_chan();
+    let po: comm::_port<()> = comm::mk_port();
+    let ch: comm::_chan<()> = po.mk_chan();
     comm::send(ch, ());
     let n: () = po.recv();
     assert (n == ());
-}
\ No newline at end of file
+}
index 580be0ed9a816645f9bdb1bea440dc2bf811cfa9..e906c47dfc46d11b24c710758e7fd0b11cd3bb16 100644 (file)
@@ -17,7 +17,7 @@ fn main() {
     test06();
 }
 
-fn test00_start(ch: _chan[int], message: int, count: int) {
+fn test00_start(ch: _chan<int>, message: int, count: int) {
     log "Starting test00_start";
     let i: int = 0;
     while i < count { log "Sending Message"; send(ch, message+0); i = i + 1; }
@@ -100,7 +100,7 @@ fn test04() {
     log "Finishing up.";
 }
 
-fn test05_start(ch: _chan[int]) {
+fn test05_start(ch: _chan<int>) {
     send(ch, 10);
     send(ch, 20);
     send(ch, 30);
index d60f7da080b14b7410866fb7c2bfd7a12c923e03..f5b914454bb27c4d808821f3c03b30822403a5fc 100644 (file)
@@ -24,8 +24,8 @@ fn main() {
     let p1;
     let p2;
 
-    p1 = comm::mk_port[int]();
-    p2 = comm::mk_port[int]();
+    p1 = comm::mk_port<int>();
+    p2 = comm::mk_port<int>();
 
     assert (p1 == p1);
     assert (p1 != p2);
@@ -42,4 +42,4 @@ fn main() {
 
     join_id(t1);
     join_id(t2);
-}
\ No newline at end of file
+}
index 61e36b171e219581c58ef749c8ee43880ded7b58..438f4431fcf14d9d355a981a0d74361769199a25 100644 (file)
@@ -12,4 +12,4 @@ fn main() {
     send(ch, 42);
     let r = po.recv();
     log_err r;
-}
\ No newline at end of file
+}
index 4729d6a4b075f48558e70eca4775d9bce8624239..65cf9ed31ad3e9266d3769aab36db14d848fe46a 100644 (file)
@@ -2,4 +2,4 @@
 
 type lteq[T] = fn(&T) -> bool ;
 
-fn main(args: [str]) { }
\ No newline at end of file
+fn main(args: [str]) { }
index 8c71b5abfb444a15811c9b892ed4a3566872ac7d..e608a9f9836ca55af7922267c1d92743193b3506 100644 (file)
@@ -2,4 +2,4 @@
 
 fn g(a: *int) -> *int { let b = f(a); ret b; }
 
-fn main(args: [str]) { ret; }
\ No newline at end of file
+fn main(args: [str]) { ret; }
index 70917c91ae0d71b6c49bbb9b4d9c46ac436cc5e2..2b316ab64c80a71a99cc70a404615705618845f3 100644 (file)
@@ -1,6 +1,6 @@
 
 
-fn foo[T](o: &myoption[T]) -> int {
+fn foo[T](o: &myoption<T>) -> int {
     let x: int = 5;
     alt o { none[T]. { } some[T](t) { x += 1; } }
     ret x;
@@ -8,4 +8,4 @@ fn foo[T](o: &myoption[T]) -> int {
 
 tag myoption[T] { none; some(T); }
 
-fn main() { log 5; }
\ No newline at end of file
+fn main() { log 5; }
index 4eb1890b80732f4d795444378b47546cc011922d..78edf8feb596d40bc8b9b6b6748e1dbee9bc7e02 100644 (file)
@@ -1,6 +1,6 @@
 
 
-fn foo[T](o: &myoption[T]) -> int {
+fn foo[T](o: &myoption<T>) -> int {
     let x: int;
     alt o { none[T]. { fail; } some[T](t) { x = 5; } }
     ret x;
@@ -8,4 +8,4 @@ fn foo[T](o: &myoption[T]) -> int {
 
 tag myoption[T] { none; some(T); }
 
-fn main() { log 5; }
\ No newline at end of file
+fn main() { log 5; }
index 6d88e1a97fdd73beecf90f03fc1aae6a3db452a3..f329908bfe2a3e3dee201a6d74e5fa0a4de14e3d 100644 (file)
@@ -28,4 +28,4 @@ fn main() {
     assert (str::shift_char(stack) == '×');
     str::unshift_char(stack, 'ß');
     assert (str::eq(stack, "ßu"));
-}
\ No newline at end of file
+}
index cdde7f7340ae84b3b7a9e9289aa37bd1f8cf697d..6a07ebf9b4ff6725656830e4503f2338135b30db 100644 (file)
@@ -79,4 +79,4 @@ fn slow_growth2() {
     assert (str::refcount(s) == const_refcount);
 }
 
-fn main() { fast_growth(); slow_growth(); slow_growth2(); }
\ No newline at end of file
+fn main() { fast_growth(); slow_growth(); slow_growth2(); }
index 382c8de97a02d4699e9ab80a1496e4775e47222b..2804f8c0f10fd70146ace723eca1532ad5ce2b9b 100644 (file)
@@ -10,4 +10,4 @@ fn main() {
     assert (v.(0) == 1);
     assert (v.(7) == 8);
     assert (v.(9) == 0);
-}
\ No newline at end of file
+}
index b8bf2774d4b1992d9ffe973fb441341ac9cb2f05..dbd0bbcd82cf193a70a633ac5ec9af2f62632839 100644 (file)
@@ -5,4 +5,4 @@ fn main() {
 
     let pvec: [@{x: int, y: int}] =
         ~[@{x: 1, y: 2}, @{x: 3, y: 4}, @{x: 5, y: 6}];
-}
\ No newline at end of file
+}
index 619de5e4d7a2055d8ae5a9a925b795425e93c430..c1f180ed23773bd59c0c6587754e45d40663c4cf 100644 (file)
@@ -4,4 +4,4 @@ fn main() {
     let later: [int];
     if true { later = ~[1]; } else { later = ~[2]; }
     log later.(0);
-}
\ No newline at end of file
+}
index 2740c23df41fa25a26f380f96a140ac6a6a37250..bbf10b0587c2f57345d9a561429c5b1fa1d76a65 100644 (file)
@@ -2,4 +2,4 @@
 
 fn push[T](v: &mutable [mutable? T], t: &T) { v += ~[t]; }
 
-fn main() { let v = ~[1, 2, 3]; push(v, 1); }
\ No newline at end of file
+fn main() { let v = ~[1, 2, 3]; push(v, 1); }
index 323132d19c33c01d962ab32cf98ec3e7705df5b0..084f641871ac9ba4e44728884c456581795c52f7 100644 (file)
@@ -17,4 +17,4 @@ fn main() {
         i -= 1;
         expected_len *= 2u;
     }
-}
\ No newline at end of file
+}
index 8a11f55aa57ab7f7fbdad5d6e5e55573ac998837..f734059466f57dee7636368d50d5c8b3531d544e 100644 (file)
@@ -2,8 +2,8 @@
 // xfail-stage2
 // xfail-stage3
 fn main() {
-  let vec[int] v = [1,2,3,4,5];
+  let vec<int> v = [1,2,3,4,5];
   auto v2 = v.(1,2);
   assert (v2.(0) == 2);
   assert (v2.(1) == 3);
-}
\ No newline at end of file
+}
index bd3f6c46cf27da04df11ef66346c13de2ea7ed30..afc452342c832dd6d46b576d677f9e8848583b7e 100644 (file)
@@ -12,4 +12,4 @@ fn main() {
     x = x + 1;
     assert (v.(x) == 20);
     assert (v.(x - 1) == 10);
-}
\ No newline at end of file
+}
index 2357bf08477582a87ca5389b7f604f23fa5c5da1..d25556182819714c69d2171532421594190180c5 100644 (file)
@@ -1 +1 @@
-fn main() { let quux: @[uint] = @~[]; }
\ No newline at end of file
+fn main() { let quux: @[uint] = @~[]; }
index 1616e03effce15889fb7448815f4b72c0f377440..3dcbb96b04000aabda8dfed519aa4310cc2f38cb 100644 (file)
@@ -16,4 +16,4 @@ fn main() {
         }
     }
     assert (i == 95);
-}
\ No newline at end of file
+}
index 8478e75a5ad50e64be93050d8d2a49451ea486ce..5f83542001d46373f19dee198371b92e8f60f616 100644 (file)
@@ -3,13 +3,13 @@
 
 #[test]
 fn create_port_and_chan() {
-    let p = comm::mk_port[int]();
+    let p = comm::mk_port<int>();
     let c = p.mk_chan();
 }
 
 #[test]
 fn send_recv() {
-    let p = comm::mk_port[int]();
+    let p = comm::mk_port<int>();
     let c = p.mk_chan();
 
     comm::send(c, 42);
index 7cca79eb2883b516df5938ac018ec49f779bcfb8..f2d47b83a466ad6052eccfb6eb1e2f9de2606d3b 100644 (file)
@@ -6,7 +6,7 @@
 
 #[test]
 fn test_simple() {
-    let d: deque::t[int] = deque::create[int]();
+    let d: deque::t<int> = deque::create[int]();
     assert (d.size() == 0u);
     d.add_front(17);
     d.add_front(42);
@@ -50,7 +50,7 @@ fn test_simple() {
 }
 
 fn test_boxes(a: @int, b: @int, c: @int, d: @int) {
-    let deq: deque::t[@int] = deque::create[@int]();
+    let deq: deque::t<@int> = deque::create[@int]();
     assert (deq.size() == 0u);
     deq.add_front(a);
     deq.add_front(b);
@@ -81,8 +81,8 @@ fn test_boxes(a: @int, b: @int, c: @int, d: @int) {
 
 type eqfn[T] = fn(&T, &T) -> bool ;
 
-fn test_parameterized[@T](e: eqfn[T], a: &T, b: &T, c: &T, d: &T) {
-    let deq: deque::t[T] = deque::create[T]();
+fn test_parameterized[@T](e: eqfn<T>, a: &T, b: &T, c: &T, d: &T) {
+    let deq: deque::t<T> = deque::create[T]();
     assert (deq.size() == 0u);
     deq.add_front(a);
     deq.add_front(b);
@@ -138,7 +138,7 @@ fn taggyeq(a: &taggy, b: &taggy) -> bool {
           }
         }
     }
-    fn taggypareq[@T](a: &taggypar[T], b: &taggypar[T]) -> bool {
+    fn taggypareq[@T](a: &taggypar<T>, b: &taggypar<T>) -> bool {
         alt a {
           onepar[T](a1) {
             alt b { onepar[T](b1) { ret a1 == b1; } _ { ret false; } }
@@ -166,20 +166,20 @@ fn reccyeq(a: &reccy, b: &reccy) -> bool {
     test_boxes(@5, @72, @64, @175);
     log "*** end test boxes";
     log "test parameterized: int";
-    let eq1: eqfn[int] = inteq;
+    let eq1: eqfn<int> = inteq;
     test_parameterized[int](eq1, 5, 72, 64, 175);
     log "*** test parameterized: @int";
-    let eq2: eqfn[@int] = intboxeq;
+    let eq2: eqfn<@int> = intboxeq;
     test_parameterized[@int](eq2, @5, @72, @64, @175);
     log "*** end test parameterized @int";
     log "test parameterized: taggy";
-    let eq3: eqfn[taggy] = taggyeq;
+    let eq3: eqfn<taggy> = taggyeq;
     test_parameterized[taggy](eq3, one(1), two(1, 2), three(1, 2, 3),
                               two(17, 42));
 
-    log "*** test parameterized: taggypar[int]";
-    let eq4: eqfn[taggypar[int]] = taggypareq[int];
-    test_parameterized[taggypar[int]](eq4,
+    log "*** test parameterized: taggypar<int>";
+    let eq4: eqfn<taggypar<int>> = taggypareq[int];
+    test_parameterized[taggypar<int>](eq4,
                                       onepar[int](1),
                                       twopar[int](1, 2),
                                       threepar[int](1, 2, 3),
@@ -191,7 +191,7 @@ fn reccyeq(a: &reccy, b: &reccy) -> bool {
     let reccy2: reccy = {x: 345, y: 2, t: two(1, 2)};
     let reccy3: reccy = {x: 1, y: 777, t: three(1, 2, 3)};
     let reccy4: reccy = {x: 19, y: 252, t: two(17, 42)};
-    let eq5: eqfn[reccy] = reccyeq;
+    let eq5: eqfn<reccy> = reccyeq;
     test_parameterized[reccy](eq5, reccy1, reccy2, reccy3, reccy4);
     log "*** end test parameterized: reccy";
     log "*** done";
index b4d8d6286ad5fa568aa467ab6d900d15d1cbea05..21b8184f4960dcc426437925b9aa200287838003 100644 (file)
@@ -27,14 +27,14 @@ fn test_lefts() {
 
 #[test]
 fn test_lefts_none() {
-    let input: [t[int, int]] = ~[right(10), right(10)];
+    let input: [t<int, int>] = ~[right(10), right(10)];
     let result = lefts(input);
     assert (len(result) == 0u);
 }
 
 #[test]
 fn test_lefts_empty() {
-    let input: [t[int, int]] = ~[];
+    let input: [t<int, int>] = ~[];
     let result = lefts(input);
     assert (len(result) == 0u);
 }
@@ -48,14 +48,14 @@ fn test_rights() {
 
 #[test]
 fn test_rights_none() {
-    let input: [t[int, int]] = ~[left(10), left(10)];
+    let input: [t<int, int>] = ~[left(10), left(10)];
     let result = rights(input);
     assert (len(result) == 0u);
 }
 
 #[test]
 fn test_rights_empty() {
-    let input: [t[int, int]] = ~[];
+    let input: [t<int, int>] = ~[];
     let result = rights(input);
     assert (len(result) == 0u);
 }
@@ -73,7 +73,7 @@ fn test_partition() {
 
 #[test]
 fn test_partition_no_lefts() {
-    let input: [t[int, int]] = ~[right(10), right(11)];
+    let input: [t<int, int>] = ~[right(10), right(11)];
     let result = partition(input);
     assert (len(result.lefts) == 0u);
     assert (len(result.rights) == 2u);
@@ -81,7 +81,7 @@ fn test_partition_no_lefts() {
 
 #[test]
 fn test_partition_no_rights() {
-    let input: [t[int, int]] = ~[left(10), left(11)];
+    let input: [t<int, int>] = ~[left(10), left(11)];
     let result = partition(input);
     assert (len(result.lefts) == 2u);
     assert (len(result.rights) == 0u);
@@ -89,7 +89,7 @@ fn test_partition_no_rights() {
 
 #[test]
 fn test_partition_empty() {
-    let input: [t[int, int]] = ~[];
+    let input: [t<int, int>] = ~[];
     let result = partition(input);
     assert (len(result.lefts) == 0u);
     assert (len(result.rights) == 0u);
index 389fab07c157aa1500a92f11a89a1dc5ba18b046..383a6ce49fe38bc11351b5e359e00eb4c257a495 100644 (file)
@@ -25,7 +25,7 @@ fn test_foldl() {
 #[test]
 fn test_find_success() {
     let l = from_vec(~[0, 1, 2]);
-    fn match(i: &int) -> option::t[int] {
+    fn match(i: &int) -> option::t<int> {
         ret if i == 2 { option::some(i) } else { option::none[int] };
     }
     let rs = list::find(l, match);
@@ -35,7 +35,7 @@ fn match(i: &int) -> option::t[int] {
 #[test]
 fn test_find_fail() {
     let l = from_vec(~[0, 1, 2]);
-    fn match(i: &int) -> option::t[int] { ret option::none[int]; }
+    fn match(i: &int) -> option::t<int> { ret option::none[int]; }
     let rs = list::find(l, match);
     assert (rs == option::none[int]);
 }
index 0031f338f1f6b677cf1b388881aabdfa95ad5e25..ffda00c4947c003f4b046f02559ff6e9ee05faeb 100644 (file)
@@ -17,12 +17,12 @@ fn hash_uint(u: &uint) -> uint {
 
         ret u;
     }
-    let hasher_uint: map::hashfn[uint] = hash_uint;
-    let eqer_uint: map::eqfn[uint] = eq_uint;
-    let hasher_str: map::hashfn[str] = str::hash;
-    let eqer_str: map::eqfn[str] = str::eq;
+    let hasher_uint: map::hashfn<uint> = hash_uint;
+    let eqer_uint: map::eqfn<uint> = eq_uint;
+    let hasher_str: map::hashfn<str> = str::hash;
+    let eqer_str: map::eqfn<str> = str::eq;
     log "uint -> uint";
-    let hm_uu: map::hashmap[uint, uint] =
+    let hm_uu: map::hashmap<uint, uint> =
         map::mk_hashmap[uint, uint](hasher_uint, eqer_uint);
     assert (hm_uu.insert(10u, 12u));
     assert (hm_uu.insert(11u, 13u));
@@ -38,7 +38,7 @@ fn hash_uint(u: &uint) -> uint {
     let eleven: str = "eleven";
     let twelve: str = "twelve";
     log "str -> uint";
-    let hm_su: map::hashmap[str, uint] =
+    let hm_su: map::hashmap<str, uint> =
         map::mk_hashmap[str, uint](hasher_str, eqer_str);
     assert (hm_su.insert("ten", 12u));
     assert (hm_su.insert(eleven, 13u));
@@ -52,7 +52,7 @@ fn hash_uint(u: &uint) -> uint {
     assert (!hm_su.insert("twelve", 12u));
     assert (hm_su.get("twelve") == 12u);
     log "uint -> str";
-    let hm_us: map::hashmap[uint, str] =
+    let hm_us: map::hashmap<uint, str> =
         map::mk_hashmap[uint, str](hasher_uint, eqer_uint);
     assert (hm_us.insert(10u, "twelve"));
     assert (hm_us.insert(11u, "thirteen"));
@@ -65,7 +65,7 @@ fn hash_uint(u: &uint) -> uint {
     assert (!hm_us.insert(12u, "twelve"));
     assert (str::eq(hm_us.get(12u), "twelve"));
     log "str -> str";
-    let hm_ss: map::hashmap[str, str] =
+    let hm_ss: map::hashmap<str, str> =
         map::mk_hashmap[str, str](hasher_str, eqer_str);
     assert (hm_ss.insert(ten, "twelve"));
     assert (hm_ss.insert(eleven, "thirteen"));
@@ -96,9 +96,9 @@ fn hash_uint(u: &uint) -> uint {
         ret u;
     }
     log "uint -> uint";
-    let hasher_uint: map::hashfn[uint] = hash_uint;
-    let eqer_uint: map::eqfn[uint] = eq_uint;
-    let hm_uu: map::hashmap[uint, uint] =
+    let hasher_uint: map::hashfn<uint> = hash_uint;
+    let eqer_uint: map::eqfn<uint> = eq_uint;
+    let hm_uu: map::hashmap<uint, uint> =
         map::mk_hashmap[uint, uint](hasher_uint, eqer_uint);
     let i: uint = 0u;
     while i < num_to_insert {
@@ -127,9 +127,9 @@ fn hash_uint(u: &uint) -> uint {
         i += 1u;
     }
     log "str -> str";
-    let hasher_str: map::hashfn[str] = str::hash;
-    let eqer_str: map::eqfn[str] = str::eq;
-    let hm_ss: map::hashmap[str, str] =
+    let hasher_str: map::hashfn<str> = str::hash;
+    let eqer_str: map::eqfn<str> = str::eq;
+    let hm_ss: map::hashmap<str, str> =
         map::mk_hashmap[str, str](hasher_str, eqer_str);
     i = 0u;
     while i < num_to_insert {
@@ -178,9 +178,9 @@ fn hash(u: &uint) -> uint {
     assert (hash(0u) == hash(1u));
     assert (hash(2u) == hash(3u));
     assert (hash(0u) != hash(2u));
-    let hasher: map::hashfn[uint] = hash;
-    let eqer: map::eqfn[uint] = eq;
-    let hm: map::hashmap[uint, uint] =
+    let hasher: map::hashfn<uint> = hash;
+    let eqer: map::eqfn<uint> = eq;
+    let hm: map::hashmap<uint, uint> =
         map::mk_hashmap[uint, uint](hasher, eqer);
     let i: uint = 0u;
     while i < num_to_insert {
@@ -198,7 +198,7 @@ fn hash(u: &uint) -> uint {
          * FIXME (issue #150): we want to check the removed value as in the
          * following:
 
-        let util.option[uint] v = hm.remove(i);
+        let v: util.option<uint> = hm.remove(i);
         alt (v) {
           case (util.some[uint](u)) {
             assert (u == (i * i));
@@ -281,4 +281,4 @@ fn test_find() {
     assert (std::option::is_none(map.find(key)));
     map.insert(key, "val");
     assert (std::option::get(map.find(key)) == "val");
-}
\ No newline at end of file
+}
index 22f3cef783a54d93d57f159b655ace3bd406cb1e..dab250ce142589dae7f02231ddf3f14c0a620ae6 100644 (file)
@@ -12,7 +12,7 @@
 
 pred is_three(n: &uint) -> bool { ret n == 3u; }
 
-fn square_if_odd(n: &uint) -> option::t[uint] {
+fn square_if_odd(n: &uint) -> option::t<uint> {
     ret if n % 2u == 1u { some(n * n) } else { none };
 }
 
@@ -264,7 +264,7 @@ fn test_filter_map() {
     assert (w.(1) == 9u);
     assert (w.(2) == 25u);
 
-    fn halve(i: &int) -> option::t[int] {
+    fn halve(i: &int) -> option::t<int> {
         if i % 2 == 0 {
             ret option::some[int](i / 2);
         } else { ret option::none[int]; }
index bde93afb26d031e5349e6dbd4440a28c0ba79103..e2b11cbfb28eb341a7cfcf4797993f56d9bbc793 100644 (file)
@@ -25,4 +25,4 @@ fn test_simple() {
     }
     log "refcnt is";
     log str::refcount(s1);
-}
\ No newline at end of file
+}