Patrick Walton
bcf04e253f
Revert "Remove usages of case(_) { fail; } since the compiler does this automatically". When we have exhaustiveness checking, "case(_) { fail; }" will be useful to silence warnings.
...
This reverts commit 92a716d862
.
2011-03-22 14:02:52 -07:00
Patrick Walton
6623597c18
lib: Add an EBML reader module
2011-03-22 14:00:27 -07:00
Brian Anderson
92a716d862
Remove usages of case(_) { fail; } since the compiler does this automatically
2011-03-22 08:11:34 -07:00
Patrick Walton
e56a1720e4
Add a "last" function to return the last element of a vector to the standard library
2011-03-21 17:21:35 -07:00
Patrick Walton
71de17d38e
Add a binding to ftell()
2011-03-21 16:41:18 -07:00
Graydon Hoare
0c7545c1ce
Switch win32 path_sep to '/', add comment explaining a bit.
2011-03-20 19:43:43 -07:00
Graydon Hoare
460d89156f
Add slightly nicer failure message to io.rs when it can't open a file.
2011-03-20 19:43:41 -07:00
Patrick Walton
9ad9d3783d
rustc: Fix list.foldl() to pass its second argument by alias
2011-03-18 15:19:32 -07:00
Patrick Walton
47d650e25b
rustc: Box the tuples returned by hashmap.items() for now since we don't have alias iterators yet
2011-03-18 15:18:45 -07:00
Patrick Walton
a9ba76d52a
Fix bug in string comparison. std.rc typechecks now.
2011-03-18 14:15:27 -07:00
Patrick Walton
0cf16e77ca
Add "mutable?" to _vec in the standard library; fix callers
2011-03-18 14:01:03 -07:00
Patrick Walton
368eb4bab6
Add some mutable variants of vector functions to the standard library
2011-03-18 13:53:49 -07:00
Patrick Walton
8aa946ff5e
Make some standard library pieces no longer dependent on mutable parameters, which rustc doesn't support
2011-03-18 13:32:15 -07:00
Patrick Walton
84321d1f59
Add an option.is_none() method
2011-03-17 11:21:11 -07:00
Patrick Walton
ea7197e2cf
rustc: Add str_from_cstr() and str_from_buf() functions to the standard library, as well as a test case
2011-03-16 18:42:08 -07:00
Graydon Hoare
6a6a30b792
Remove uses of 'break' in std lib; rustc doesn't support it yet, this is easier for now.
2011-03-16 16:47:27 -07:00
Graydon Hoare
54587bdccb
Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tweak std lib vec fns in process.
2011-03-16 14:58:02 -07:00
Patrick Walton
1a3f533d28
Typo: FIXE -> FIXME
2011-03-15 17:13:19 -07:00
Patrick Walton
6d5379cdcb
Add a fs.connect() function to join paths
2011-03-15 17:11:55 -07:00
Patrick Walton
a8d8ea3cf3
Add an OS-specific dylib_filename() function to the standard library
2011-03-15 16:56:59 -07:00
Graydon Hoare
45f7955261
Put out darwin fire.
2011-03-14 16:14:17 -07:00
Brian Anderson
922f69387d
Add _int.pow
2011-03-14 15:52:48 -07:00
Marijn Haverbeke
ea5dc54c3f
Add functionality for running external programs to the std lib
...
See lib/run_program.rs.
2011-03-14 14:57:13 -07:00
Marijn Haverbeke
441697ab35
Extend stream functionality
...
Writer and reader streams now come with methods to write and read
little-endian numbers. Whether that is the right place for such
methods is debatable, but for now, that's where they live.
2011-03-14 14:57:13 -07:00
Marijn Haverbeke
c731d625fe
Add basic file-system functionality
...
std.fs.list_dir will list the files in a directory, std.fs.file_is_dir
will, given a pathname, determine whether it is a directory or not.
2011-03-14 14:57:13 -07:00
Graydon Hoare
11a10c7a7b
Remove redundant imports in lib (rustc doesn't like 'std' as a synonym for root within std.rc anyway)
2011-03-09 17:29:18 -08:00
Marijn Haverbeke
aed40fbcd8
Have the pretty-printer take a writer stream as argument
...
It now uses a string writer to also fill in for
middle.ty.ast_ty_to_str
2011-03-09 16:15:55 -08:00
Marijn Haverbeke
dddd7d8f44
Add stdout_writer and string_writer to std.io
...
For use by pretty-printer. string_writer API is a bit silly
right now, feel free to suggest a cleaner way to do this.
2011-03-09 16:15:52 -08:00
Marijn Haverbeke
0624f9db4a
Add a pretty-printer
...
Adds a -pp option to the compiler which will cause it to simply
pretty-print the given file.
2011-03-07 12:58:08 -08:00
Brian Anderson
bed457d3a7
Change io.fileflag to a tag type. Remove FIXME
2011-03-06 15:13:30 -08:00
Brian Anderson
330c9c6c35
Make _str.bytes use _vec.init_fn. Remove FIXME.
2011-03-06 15:13:28 -08:00
Brian Anderson
3b7e9dc393
Rustify some comments lifted directly from the sha-1 reference implementation
2011-02-22 21:52:23 -05:00
Brian Anderson
c4df39609c
Rename std._io to std.io since 'io' is no longer a keyword
2011-02-22 21:52:23 -05:00
Brian Anderson
cbe8d222a8
Implement sha-1 in standard library. Closes #228
2011-02-21 01:00:43 -05:00
Graydon Hoare
11cbbcf79e
Add std.path module for pathname manipulations.
2011-01-10 18:17:24 -08:00
Graydon Hoare
b000bfeedc
Fail in new_stdio_reader when libc.fopen fails.
2011-01-10 18:16:57 -08:00
Graydon Hoare
001d7bfa17
Add _str.starts_with and ends_with.
2011-01-03 20:39:33 -08:00
Graydon Hoare
c0d4e88428
Add std.dbg.trap(str msg) for help debugging.
2010-12-31 10:35:39 -08:00
Graydon Hoare
3504f4a4bf
Sort methods in object types.
2010-12-21 16:43:28 -08:00
Graydon Hoare
6443179bca
Add std.sort, with a simple mergesort.
2010-12-21 00:44:06 -08:00
Patrick Walton
77ff12c435
rustboot: Don't use walk to traverse statements in type.ml; fixes redundant checking, improves diagnostics. Also report untyped slots.
2010-11-18 14:19:06 -08:00
Graydon Hoare
a404e54261
Teach rustc about const tag value, begin work on trans_copy_ty, make uint's to_str routine less clever and thereby resist overflow.
2010-11-09 17:50:31 -08:00
Patrick Walton
3e482d5f69
Implement a map2() function in std._vec
2010-11-09 15:38:42 -08:00
Graydon Hoare
89946609f2
Support a special const-value refcount, use it for const strings.
2010-11-09 14:15:07 -08:00
Graydon Hoare
3e9be14757
Add a check for binding an alias. Good thing, as we had two instances in our library.
2010-11-08 15:45:30 -08:00
Patrick Walton
adb1754e4d
Move the option type to its own module
2010-11-05 11:18:40 -07:00
Patrick Walton
2fcf81cc4b
Revert "Move the option type to its own module"
2010-11-05 10:41:23 -07:00
Patrick Walton
1d214b4df3
Move the option type to its own module
2010-11-05 10:23:22 -07:00
Graydon Hoare
7abf6eb7c6
Shift obj, type, param decls to have strata rather than effects.
2010-11-02 17:20:57 -07:00
Graydon Hoare
7db115834f
Split out stratum-checking pass, implement more-strict (overly aggressive) impure-effect checking.
2010-11-02 15:24:46 -07:00