Skip to content

Commit

Permalink
More on sterror.
Browse files Browse the repository at this point in the history
  • Loading branch information
tizoc committed Mar 29, 2017
1 parent 4ef1827 commit d0a18b2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -27,7 +27,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
- Added `(for-each F List)`. Calls `F` on every element of `List` (in order), ignoring the results.
- Added `(filter Predicate List)`. Returns a new lost with all elements to which `(Predicate Elt)` returns true.
- Added `(exit ExitCode)`. Exits the program using the specified error code. The default implementation just ends the REPL loop, ports have to override `exit` if they want the exit code to have any effect.
- Added `*sterror*`, STDERR port. Defaults to an alias of `*stoutput*`.
- Added `*sterror*` and `(sterror)`, STDERR port. Defaults to an alias of `*stoutput*`.

### Changed
- Changed `hash` so that 0 is a valid return value.
Expand Down
7 changes: 4 additions & 3 deletions sources/declarations.shen
Expand Up @@ -121,7 +121,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
address-> 3 put 4 reassemble 2 read-file-as-string 1 read-file 1
read 1 read-byte 1 read-from-string 1
receive 1 release 0 remove 2 require 3 reverse 1 set 2
simple-error 1 snd 1 specialise 1 spy 1 step 1 stinput 0 stoutput 0
simple-error 1 snd 1 specialise 1 spy 1 step 1 stinput 0 stoutput 0 sterror 0
string->n 1 string->symbol 1 string? 1 str 1 subst 3 sum 1
symbol? 1 systemf 1 tail 1 tl 1 tc 1 tc? 0
thaw 1 tlstr 1 track 1 trap-error 2 tuple? 1 type 2
Expand All @@ -146,7 +146,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

(put (intern "shen") external-symbols
[! } { --> <-- && : ; :- := _
*language* *implementation* *stinput* *stoutput* *home-directory* *version*
*language* *implementation* *stinput* *stoutput* *sterror*
*home-directory* *version*
*maximum-print-sequence-size* *macros* *os* *release* *property-vector*
*port* *porters* *hush*
@v @p @s
Expand All @@ -157,7 +158,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
unify! unput unprofile undefmacro return type tuple? true
trap-error track time thaw tc? tc tl tlstr tlv
tail systemf synonyms symbol symbol? string->symbol sum subst
string? string->n stream string stinput
string? string->n stream string stinput sterror
stoutput step spy specialise snd simple-error set save str run
reverse remove release read receive
read-file read-file-as-bytelist read-file-as-string read-byte
Expand Down
1 change: 1 addition & 0 deletions sources/make.shen
Expand Up @@ -26,6 +26,7 @@
(systemf fold-right)
(systemf filter)
(systemf exit)
(systemf sterror)

(define make
-> (map (function make-file)
Expand Down
3 changes: 3 additions & 0 deletions sources/sys.shen
Expand Up @@ -594,6 +594,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(define stoutput
-> (value *stoutput*))

(define sterror
-> (value *sterror*))

(define string->symbol
S -> (let Symbol (intern S)
(if (symbol? Symbol)
Expand Down
1 change: 1 addition & 0 deletions sources/types.shen
Expand Up @@ -181,6 +181,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(declare spy [symbol --> boolean])
(declare step [symbol --> boolean])
(declare stinput [--> [stream in]])
(declare sterror [--> [stream out]])
(declare stoutput [--> [stream out]])
(declare string? [A --> boolean])
(declare str [A --> string])
Expand Down

0 comments on commit d0a18b2

Please sign in to comment.