Add CHECK-SET routine per suggestion from @earl
Add CHECK-SET routine per suggestion from @earl

The problem which allowing `x: ()` to not be an error was designed to
address can be handled in a less system-breaking way with a primitive
suggested by @earl, which is CHECK-SET...an arity-2 function that
soft-quotes its first parameter, which is constrained to be either a
set-word or a set-path:

     if check-set var: thing-that-may-be-unset [
         ...
     ]

Idiomatically this comes across reasonably well that var: is being
set by this code.  CHECK-SET does not come off most importantly
as a query due to the lack of a question mark, rather as some form
of setting that involves a check.  Even if glossed as CHECK-SET? it
still fits well, as it seems an assignment has happened whether you
realize var: is a parameter to check-set or not.

The promise of this option outweighs the loss in locality of error
delivery given by allowing `x: ()`--hence that will be backed out
shortly.

kealist/ren-c,rgchris/ren-c,draegtun/ren-c,codebybrett/ren-c,rgchris/ren-c,kealist/ren-c,draegtun/ren-c,rgchris/ren-c,draegtun/ren-c,hostilefork/rebol,hostilefork/rebol,draegtun/ren-c,giuliolunati/ren-c,hostilefork/rebol,giuliolunati/ren-c,rgchris/ren-c,kealist/ren-c,kealist/ren-c,codebybrett/ren-c,codebybrett/ren-c,kealist/ren-c,codebybrett/ren-c,draegtun/ren-c,hostilefork/rebol,rgchris/ren-c,giuliolunati/ren-c,codebybrett/ren-c,giuliolunati/ren-c,hostilefork/rebol,giuliolunati/ren-c
REBOL [
    System: "REBOL [R3] Language Interpreter and Run-time Environment"
    Title: "REBOL 3 Mezzanine: Control"
    Rights: {
        Copyright 2012 REBOL Technologies
        REBOL is a trademark of REBOL Technologies
    }
    License: {
        Licensed under the Apache License, Version 2.0
        See: http://www.apache.org/licenses/LICENSE-2.0
    }
]

launch: func [
    {Runs a script as a separate process; return immediately.}
    script [file! string! none!] "The name of the script"
    /args arg [string! block! none!] "Arguments to the script"
    /wait "Wait for the process to terminate"
][
    if file? script [script: to-local-file clean-path script]
    args: reduce [to-local-file system/options/boot script]
    if arg [append args arg]
    either wait [call/wait args] [call args]
]

wrap: func [
    "Evaluates a block, wrapping all set-words as locals."
    body [block!] "Block to evaluate"
][
    do bind/copy/set body make object! 0
]

check-set: func [
    "Set optional value via set-word or set-path, TRUE unless UNSET!"

    'target [set-word! set-path!]
    value [unset! any-value!]
][
    any-value? set/any target :value
]

REBOL [
    System: "REBOL [R3] Language Interpreter and Run-time Environment"
    Title: "REBOL 3 Mezzanine: Control"
    Rights: {
        Copyright 2012 REBOL Technologies
        REBOL is a trademark of REBOL Technologies
    }
    License: {
        Licensed under the Apache License, Version 2.0
        See: http://www.apache.org/licenses/LICENSE-2.0
    }
]

launch: func [
    {Runs a script as a separate process; return immediately.}
    script [file! string! none!] "The name of the script"
    /args arg [string! block! none!] "Arguments to the script"
    /wait "Wait for the process to terminate"
][
    if file? script [script: to-local-file clean-path script]
    args: reduce [to-local-file system/options/boot script]
    if arg [append args arg]
    either wait [call/wait args] [call args]
]

wrap: func [
    "Evaluates a block, wrapping all set-words as locals."
    body [block!] "Block to evaluate"
][
    do bind/copy/set body make object! 0
]
