Commit Graph

763 Commits

Author SHA1 Message Date
Brian Anderson 8befdd08a3 stdlib: Fix type in docs for result::chan 2011-10-29 20:16:44 -07:00
Brian Anderson 2e0593d999 stdlib: Add vec::concat to concatenate a vector of vectors
Compare to str::concat
2011-10-29 18:14:08 -07:00
Brian Anderson 2cebef095e stdlib: Make io failures recoverable by returning a result 2011-10-29 01:25:11 -07:00
Brian Anderson 2b62a80202 stdlib: Add result::chain for composing results 2011-10-29 01:25:11 -07:00
Brian Anderson c1092fb6d8 stdlib: Add result module
This contains a result tag with ok(T) and error(U) variants. I expect
to use it for error handling on functions that can recover from errors,
like in the io module.
2011-10-29 01:25:06 -07:00
Brian Anderson 802deac323 stdlib: Add fs::splitext
Splits a path into the filename + extension
2011-10-28 23:34:01 -07:00
Brian Anderson a2377ccf91 stdlib: Add vec::init. Returns all but the last element.
Per haskell, to go with head/tail, and last.
2011-10-28 22:42:38 -07:00
Matt Brubeck 45d7777991 Change behavior of float::nonpositive/nonnegative
Rather than being defined as !positive and !negative, these should act the
same as negative and positive (respectively).  The only effect of this change
should be that all four functions will now return false for NaN.
2011-10-28 14:44:39 -07:00
Matt Brubeck 000b2fe9a6 Use IEEE 754 semantics for NaN (Issue #1084) 2011-10-28 14:44:39 -07:00
Matt Brubeck 7e064deacf +0.0 should be positive and -0.0 should be negative. 2011-10-28 14:44:39 -07:00
Brian Anderson 54ddb553c2 stdlib: Replace an unsafe cast with ptr::null 2011-10-28 14:25:40 -07:00
Brian Anderson f96ad30dfc stdlib: Make reinterpret_cast and leak unsafe 2011-10-28 14:19:17 -07:00
Brian Anderson ad66d72e6c stdlib: Make merge_sort take [mutable? T] 2011-10-28 13:56:01 -07:00
Brian Anderson 39b729e36f stdlib: Fix the list::foldl implementation 2011-10-28 13:45:32 -07:00
Brian Anderson 49e8ffa34f stdlib: Rename list::length to list::len to match vec::len 2011-10-28 13:37:19 -07:00
Brian Anderson 2e8a8390d5 stdlib: Rename the 'ls_' param in list functions to 'ls' 2011-10-28 13:34:17 -07:00
Brian Anderson 1da99cdf68 stdlib: Make list::from_vec more efficient 2011-10-28 13:32:11 -07:00
Brian Anderson d53a253dca stdlib: make list::from_vec take [mutable? T] 2011-10-28 13:24:39 -07:00
Marijn Haverbeke 7dacccde94 Make shared kind the default only for generic functions
You almost never want a function with pinned type params. For
types, objects, resources, and tags, pinned types are actually often
more sane. For most of these, shared rarely makes sense. Only tricky
case is objs -- you'll have to think about the kinds you want there.

Issue #1076
2011-10-28 17:00:14 +02:00
Marijn Haverbeke 7a0aee74bf Move to short type parameter keywords
Issue #1076
2011-10-28 15:25:33 +02:00
Brian Anderson d96c419b14 Add std::vec::foldr 2011-10-27 21:34:16 -07:00
Brian Anderson 7a7940daca Add reverse iterators to std::vec 2011-10-27 21:09:02 -07:00
Brian Anderson f1f0e6c06c Remove std::vec::eachi. Same function as iter2. 2011-10-27 20:50:10 -07:00
Brian Anderson 1a89e589a4 Implement vec::foldl without recursion 2011-10-27 20:47:06 -07:00
Brian Anderson b5ed1c46c0 Add std::vec::iter 2011-10-27 20:30:06 -07:00
Brian Anderson 9c097d19e4 Remove std::int::eq_alias
This is the exact same function as int::eq
2011-10-27 18:23:06 -07:00
Brian Anderson b16d9019a8 Make option::is_some option::is_none pure 2011-10-27 18:15:58 -07:00
Brian Anderson 91997e79aa Make vec::reversed take [mutable? T] 2011-10-27 17:49:13 -07:00
Brian Anderson 74a1e054eb Make std:vec::grow_fn take an init_op type 2011-10-27 17:06:49 -07:00
Brian Anderson 506ae934f8 Reorder std::vec so the documentation renders better
Put all types first, then predicates, then functions
2011-10-27 17:03:38 -07:00
Brian Anderson 2b85817af8 Convert various functions in std to take lambda blocks 2011-10-27 16:27:47 -07:00
Brian Anderson cf2624106c Document std::bitv 2011-10-27 15:35:56 -07:00
Brian Anderson e0715380dc Add more std docs 2011-10-27 14:54:18 -07:00
Matt Brubeck 5d6fe1a533 Remove uint::max/min in favor if math::max/min 2011-10-27 13:37:53 -07:00
Matt Brubeck 50d99ec32c Add documentation to std::uint 2011-10-27 13:37:53 -07:00
Matt Brubeck a9f9227a1c Add std documentation for float and u8 functions 2011-10-27 13:37:53 -07:00
Matt Brubeck 9e4c2b6bc6 Mark uint add/sub/mul/div/rem functions as pure 2011-10-27 13:37:53 -07:00
Matt Brubeck 8dba51b87c Add function aliases for float operators 2011-10-27 13:37:53 -07:00
Brian Anderson 26d839216b Add more std docs 2011-10-27 13:25:20 -07:00
Brian Anderson 00404ebe62 Cleanup in std::task 2011-10-27 11:29:04 -07:00
Brian Anderson 20e4f793e2 More std docs 2011-10-27 11:17:23 -07:00
Brian Anderson 17c651b3b0 Remove task::join_id
This is the old, racy way of joining to a task. It is no longer used.
2011-10-26 20:43:47 -07:00
Brian Anderson 4d669036f3 Add more std documentation 2011-10-26 18:32:34 -07:00
Brian Anderson 197c8543fe Add more std documentation 2011-10-26 11:47:42 -07:00
Brian Anderson 7ae757583a Begin documenting std and add doc generation using naturaldocs
Naturaldocs isn't really that great but it seems easier to get
something working than with doxygen, for which we would need to
convert rust code to something C++ish. We probably want to just
write a rustdoc utility at some point.
2011-10-25 18:01:52 -07:00
Marijn Haverbeke 013107a25c Properly take mutable object fields into account during alias analysis
Closes #1055
2011-10-25 17:57:26 +02:00
Marijn Haverbeke cfdf193c46 Update our code to new type parameter kind syntax
Closes #1067
2011-10-25 15:56:55 +02:00
Niko Matsakis a5cbf4b13b remove (unused) fn rust_list_files from win32_fs; that is
defined in fs.rs
2011-10-24 16:06:18 -07:00
Niko Matsakis e308f3346b remove unused task ptr arg 2011-10-24 16:06:18 -07:00
Niko Matsakis f8de679c1e move remaining task natives to cdecl ABI (run on rust stack) 2011-10-24 16:06:18 -07:00