core: Store reexporting result and either. Closes #1997
This commit is contained in:
parent
ddbd02aaf2
commit
47d468f08c
15 changed files with 20 additions and 6 deletions
|
@ -24,8 +24,7 @@ io::println(comm::recv(p));
|
||||||
~~~
|
~~~
|
||||||
"];
|
"];
|
||||||
|
|
||||||
import sys;
|
import either::either;
|
||||||
import task;
|
|
||||||
|
|
||||||
export send;
|
export send;
|
||||||
export recv;
|
export recv;
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
import option::{some, none};
|
import option::{some, none};
|
||||||
import option = option::option;
|
import option = option::option;
|
||||||
import either = either::either;
|
|
||||||
import result = result::result;
|
|
||||||
import path = path::path;
|
import path = path::path;
|
||||||
import vec::vec_len;
|
import vec::vec_len;
|
||||||
export path, option, some, none, vec_len, unreachable;
|
export path, option, some, none, vec_len, unreachable;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#[doc = "A type that represents one of two alternatives"];
|
#[doc = "A type that represents one of two alternatives"];
|
||||||
|
|
||||||
|
import result::result;
|
||||||
|
|
||||||
#[doc = "The either type"]
|
#[doc = "The either type"]
|
||||||
enum either<T, U> {
|
enum either<T, U> {
|
||||||
left(T),
|
left(T),
|
||||||
|
|
|
@ -11,6 +11,8 @@ io::println(#fmt(\"fib(5000) = %?\", delayed_fib.get()))
|
||||||
~~~
|
~~~
|
||||||
"];
|
"];
|
||||||
|
|
||||||
|
import either::either;
|
||||||
|
|
||||||
export future;
|
export future;
|
||||||
export future::{};
|
export future::{};
|
||||||
export from_value;
|
export from_value;
|
||||||
|
|
|
@ -4,6 +4,8 @@ Module: io
|
||||||
Basic input/output
|
Basic input/output
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import result::result;
|
||||||
|
|
||||||
import libc::{c_int, c_uint, c_void, size_t, ssize_t};
|
import libc::{c_int, c_uint, c_void, size_t, ssize_t};
|
||||||
import libc::consts::os::posix88::*;
|
import libc::consts::os::posix88::*;
|
||||||
import libc::consts::os::extra::*;
|
import libc::consts::os::extra::*;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#[doc = "A type representing either success or failure"];
|
#[doc = "A type representing either success or failure"];
|
||||||
|
|
||||||
|
import either::either;
|
||||||
|
|
||||||
#[doc = "The result type"]
|
#[doc = "The result type"]
|
||||||
enum result<T, U> {
|
enum result<T, U> {
|
||||||
#[doc = "Contains the successful result value"]
|
#[doc = "Contains the successful result value"]
|
||||||
|
|
|
@ -22,6 +22,8 @@ spawn {||
|
||||||
~~~
|
~~~
|
||||||
"];
|
"];
|
||||||
|
|
||||||
|
import result::result;
|
||||||
|
|
||||||
export task;
|
export task;
|
||||||
export task_result;
|
export task_result;
|
||||||
export notification;
|
export notification;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#[doc = "json serialization"];
|
#[doc = "json serialization"];
|
||||||
|
|
||||||
import result::{ok, err};
|
import result::{result, ok, err};
|
||||||
import io;
|
import io;
|
||||||
import io::{reader_util, writer_util};
|
import io::{reader_util, writer_util};
|
||||||
import map;
|
import map;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// simplest interface possible for representing and running tests
|
// simplest interface possible for representing and running tests
|
||||||
// while providing a base that other test frameworks may build off of.
|
// while providing a base that other test frameworks may build off of.
|
||||||
|
|
||||||
|
import either::either;
|
||||||
import result::{ok, err};
|
import result::{ok, err};
|
||||||
import io::writer_util;
|
import io::writer_util;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import std::map;
|
import std::map;
|
||||||
import std::map::hashmap;
|
import std::map::hashmap;
|
||||||
|
import either::either;
|
||||||
import syntax::{ast, ast_util};
|
import syntax::{ast, ast_util};
|
||||||
import driver::session::session;
|
import driver::session::session;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import std::{ufind, map, smallintmap};
|
import std::{ufind, map, smallintmap};
|
||||||
|
import result::result;
|
||||||
import std::map::hashmap;
|
import std::map::hashmap;
|
||||||
import driver::session;
|
import driver::session;
|
||||||
import session::session;
|
import session::session;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import result::result;
|
||||||
import syntax::{ast, ast_util};
|
import syntax::{ast, ast_util};
|
||||||
import ast::spanned;
|
import ast::spanned;
|
||||||
import syntax::ast_util::{local_def, respan};
|
import syntax::ast_util::{local_def, respan};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import either::{left, right};
|
import result::result;
|
||||||
|
import either::{either, left, right};
|
||||||
import std::map::{hashmap, str_hash};
|
import std::map::{hashmap, str_hash};
|
||||||
import token::can_begin_expr;
|
import token::can_begin_expr;
|
||||||
import codemap::{span,fss_none};
|
import codemap::{span,fss_none};
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// FIXME: I'm not happy how this module turned out. Should probably
|
// FIXME: I'm not happy how this module turned out. Should probably
|
||||||
// just be folded into cstore.
|
// just be folded into cstore.
|
||||||
|
|
||||||
|
import result::result;
|
||||||
export filesearch;
|
export filesearch;
|
||||||
export mk_filesearch;
|
export mk_filesearch;
|
||||||
export pick;
|
export pick;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import result::result;
|
||||||
import std::getopts;
|
import std::getopts;
|
||||||
|
|
||||||
export output_format;
|
export output_format;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue