about summary refs log tree commit diff
path: root/src/comp/syntax/ext
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-01-31 17:05:20 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-01-31 17:05:20 -0800
commite5d095d67e3926fa104ac495076fe9d4cd4f5562 (patch)
tree07be94199b1062e4ba99be9c014178d26543a0aa /src/comp/syntax/ext
parent1f795ff3b0c0cac31c1d9fd2406d0d53e774683a (diff)
Change option::t to option
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.

The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
Diffstat (limited to 'src/comp/syntax/ext')
-rw-r--r--src/comp/syntax/ext/base.rs4
-rw-r--r--src/comp/syntax/ext/concat_idents.rs2
-rw-r--r--src/comp/syntax/ext/env.rs4
-rw-r--r--src/comp/syntax/ext/fmt.rs2
-rw-r--r--src/comp/syntax/ext/ident_to_str.rs2
-rw-r--r--src/comp/syntax/ext/log_syntax.rs2
-rw-r--r--src/comp/syntax/ext/simplext.rs26
7 files changed, 21 insertions, 21 deletions
diff --git a/src/comp/syntax/ext/base.rs b/src/comp/syntax/ext/base.rs
index 50ff9932e7e..bfe3e36c0bc 100644
--- a/src/comp/syntax/ext/base.rs
+++ b/src/comp/syntax/ext/base.rs
@@ -6,10 +6,10 @@ import std::map::new_str_hash;
 import codemap;
 
 type syntax_expander =
-    fn@(ext_ctxt, span, @ast::expr, option::t<str>) -> @ast::expr;
+    fn@(ext_ctxt, span, @ast::expr, option<str>) -> @ast::expr;
 type macro_def = {ident: str, ext: syntax_extension};
 type macro_definer =
-    fn@(ext_ctxt, span, @ast::expr, option::t<str>) -> macro_def;
+    fn@(ext_ctxt, span, @ast::expr, option<str>) -> macro_def;
 
 enum syntax_extension {
     normal(syntax_expander),
diff --git a/src/comp/syntax/ext/concat_idents.rs b/src/comp/syntax/ext/concat_idents.rs
index c487a3ecc36..0a9d5b4cf3e 100644
--- a/src/comp/syntax/ext/concat_idents.rs
+++ b/src/comp/syntax/ext/concat_idents.rs
@@ -3,7 +3,7 @@ import base::*;
 import syntax::ast;
 
 fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
-                     _body: option::t<str>) -> @ast::expr {
+                     _body: option<str>) -> @ast::expr {
     let args: [@ast::expr] =
         alt arg.node {
           ast::expr_vec(elts, _) { elts }
diff --git a/src/comp/syntax/ext/env.rs b/src/comp/syntax/ext/env.rs
index e5d80c3f314..fe464473e03 100644
--- a/src/comp/syntax/ext/env.rs
+++ b/src/comp/syntax/ext/env.rs
@@ -10,7 +10,7 @@ import base::*;
 export expand_syntax_ext;
 
 fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
-                     _body: option::t<str>) -> @ast::expr {
+                     _body: option<str>) -> @ast::expr {
     let args: [@ast::expr] =
         alt arg.node {
           ast::expr_vec(elts, _) { elts }
@@ -22,7 +22,7 @@ fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
         cx.span_fatal(sp, "malformed #env call");
     }
     // FIXME: if this was more thorough it would manufacture an
-    // option::t<str> rather than just an maybe-empty string.
+    // option<str> rather than just an maybe-empty string.
 
     let var = expr_to_str(cx, args[0], "#env requires a string");
     alt generic_os::getenv(var) {
diff --git a/src/comp/syntax/ext/fmt.rs b/src/comp/syntax/ext/fmt.rs
index 5b57923e308..0dfe2cb17d0 100644
--- a/src/comp/syntax/ext/fmt.rs
+++ b/src/comp/syntax/ext/fmt.rs
@@ -13,7 +13,7 @@ import codemap::span;
 export expand_syntax_ext;
 
 fn expand_syntax_ext(cx: ext_ctxt, sp: span, arg: @ast::expr,
-                     _body: option::t<str>) -> @ast::expr {
+                     _body: option<str>) -> @ast::expr {
     let args: [@ast::expr] =
         alt arg.node {
           ast::expr_vec(elts, _) { elts }
diff --git a/src/comp/syntax/ext/ident_to_str.rs b/src/comp/syntax/ext/ident_to_str.rs
index d6093b61dbf..5fbc05062ee 100644
--- a/src/comp/syntax/ext/ident_to_str.rs
+++ b/src/comp/syntax/ext/ident_to_str.rs
@@ -3,7 +3,7 @@ import base::*;
 import syntax::ast;
 
 fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
-                     _body: option::t<str>) -> @ast::expr {
+                     _body: option<str>) -> @ast::expr {
     let args: [@ast::expr] =
         alt arg.node {
           ast::expr_vec(elts, _) { elts }
diff --git a/src/comp/syntax/ext/log_syntax.rs b/src/comp/syntax/ext/log_syntax.rs
index 47a639b7ed0..b7be75e349f 100644
--- a/src/comp/syntax/ext/log_syntax.rs
+++ b/src/comp/syntax/ext/log_syntax.rs
@@ -3,7 +3,7 @@ import syntax::ast;
 import std::io::writer_util;
 
 fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
-                     _body: option::t<str>) -> @ast::expr {
+                     _body: option<str>) -> @ast::expr {
 
     cx.print_backtrace();
     std::io::stdout().write_line(print::pprust::expr_to_str(arg));
diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs
index b7fdfc46908..cc133e704e7 100644
--- a/src/comp/syntax/ext/simplext.rs
+++ b/src/comp/syntax/ext/simplext.rs
@@ -15,7 +15,7 @@ import ast::{ident, path, ty, blk_, expr, path_, expr_path,
 
 export add_new_extension;
 
-fn path_to_ident(pth: @path) -> option::t<ident> {
+fn path_to_ident(pth: @path) -> option<ident> {
     if vec::len(pth.node.idents) == 1u && vec::len(pth.node.types) == 0u {
         ret some(pth.node.idents[0u]);
     }
@@ -71,11 +71,11 @@ fn match_error(cx: ext_ctxt, m: matchable, expected: str) -> ! {
 // If we want better match failure error messages (like in Fortifying Syntax),
 // we'll want to return something indicating amount of progress and location
 // of failure instead of `none`.
-type match_result = option::t<arb_depth<matchable>>;
+type match_result = option<arb_depth<matchable>>;
 type selector = fn@(matchable) -> match_result;
 
 fn elts_to_ell(cx: ext_ctxt, elts: [@expr]) ->
-   {pre: [@expr], rep: option::t<@expr>, post: [@expr]} {
+   {pre: [@expr], rep: option<@expr>, post: [@expr]} {
     let idx: uint = 0u;
     let res = none;
     for elt: @expr in elts {
@@ -104,8 +104,8 @@ fn elts_to_ell(cx: ext_ctxt, elts: [@expr]) ->
         }
 }
 
-fn option_flatten_map<T: copy, U: copy>(f: fn@(T) -> option::t<U>, v: [T]) ->
-   option::t<[U]> {
+fn option_flatten_map<T: copy, U: copy>(f: fn@(T) -> option<U>, v: [T]) ->
+   option<[U]> {
     let res = [];
     for elem: T in v {
         alt f(elem) { none { ret none; } some(fv) { res += [fv]; } }
@@ -165,7 +165,7 @@ fn pattern_to_selectors(cx: ext_ctxt, e: @expr) -> binders {
 bindings. Most of the work is done in p_t_s, which generates the
 selectors. */
 
-fn use_selectors_to_bind(b: binders, e: @expr) -> option::t<bindings> {
+fn use_selectors_to_bind(b: binders, e: @expr) -> option<bindings> {
     let res = new_str_hash::<arb_depth<matchable>>();
     //need to do this first, to check vec lengths.
     for sel: selector in b.literal_ast_matchers {
@@ -223,8 +223,8 @@ fn follow(m: arb_depth<matchable>, idx_path: @mutable [uint]) ->
     ret res;
 }
 
-fn follow_for_trans(cx: ext_ctxt, mmaybe: option::t<arb_depth<matchable>>,
-                    idx_path: @mutable [uint]) -> option::t<matchable> {
+fn follow_for_trans(cx: ext_ctxt, mmaybe: option<arb_depth<matchable>>,
+                    idx_path: @mutable [uint]) -> option<matchable> {
     alt mmaybe {
       none { ret none }
       some(m) {
@@ -269,7 +269,7 @@ fn transcribe_exprs(cx: ext_ctxt, b: bindings, idx_path: @mutable [uint],
         alt repeat_me_maybe {
           none { }
           some(repeat_me) {
-            let repeat: option::t<{rep_count: uint, name: ident}> = none;
+            let repeat: option<{rep_count: uint, name: ident}> = none;
             /* we need to walk over all the free vars in lockstep, except for
             the leaves, which are just duplicated */
             free_vars(b, repeat_me) {|fv|
@@ -523,7 +523,7 @@ fn p_t_s_r_path(cx: ext_ctxt, p: @path, s: selector, b: binders) {
     }
 }
 
-fn block_to_ident(blk: blk_) -> option::t<ident> {
+fn block_to_ident(blk: blk_) -> option<ident> {
     if vec::len(blk.stmts) != 0u { ret none; }
     ret alt blk.expr {
           some(expr) {
@@ -667,7 +667,7 @@ fn p_t_s_r_actual_vector(cx: ext_ctxt, elts: [@expr], _repeat_after: bool,
 }
 
 fn add_new_extension(cx: ext_ctxt, sp: span, arg: @expr,
-                     _body: option::t<str>) -> base::macro_def {
+                     _body: option<str>) -> base::macro_def {
     let args: [@ast::expr] =
         alt arg.node {
           ast::expr_vec(elts, _) { elts }
@@ -677,7 +677,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: @expr,
           }
         };
 
-    let macro_name: option::t<str> = none;
+    let macro_name: option<str> = none;
     let clauses: [@clause] = [];
     for arg: @expr in args {
         alt arg.node {
@@ -751,7 +751,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: @expr,
          ext: normal(ext)};
 
     fn generic_extension(cx: ext_ctxt, sp: span, arg: @expr,
-                         _body: option::t<str>, clauses: [@clause]) -> @expr {
+                         _body: option<str>, clauses: [@clause]) -> @expr {
         for c: @clause in clauses {
             alt use_selectors_to_bind(c.params, arg) {
               some(bindings) { ret transcribe(cx, bindings, c.body); }