scheme / scsh

A Unix shell embedded in scheme
Other
386 stars 36 forks source link

There is no ERROR procedure #4

Closed nxg closed 10 years ago

nxg commented 11 years ago

There was an (error ...) procedure in scsh 0.6.7, but it's not present in 0.7

Welcome to scsh 0.6.7 (R6RS)
Type ,? for help.
> error
'#{Procedure 160 (error in scheme-level-0)}
> ^D

versus Welcome to scsh 0.7 Type ,? for help.

error

assertion-violation: undefined variable [global]
                     error
                     scsh-user
1> ^D
> 

That said, I've no idea how I knew about this (useful) procedure, since it doesn't appear to be documented in the scsh manual (nor is it in the s48 manual or R5RS).

If it was never supposed to be there (!), then this bug's invalid, and I'll just have to roll my own exceptions.

roderyc commented 11 years ago

Ya, I think this changed because I've been more strict / explicit about package imports and exports in 0.7. error is available in the signals package (all the scsh code that uses error uses the one there). It's a toss up to me whether to add it to the default exports. You have a preference for it being there or importing from signals?

nxg commented 11 years ago

I think having it in a separate signals package sounds plausible and tidy (which I'm a fan of, too). That might need a remark in the docs, though....