     @set definition
     return definition
 
-  # TODO: enable resolve to merge nested definitions when only one key...
+  # returns merged nested definitions
   resolve: (keys..., opts={}) ->
     unless opts instanceof Object
       keys.push opts

    opts.warn ?= true
    opts.recurse ?= true

    [ type, key ] = keys
    [ prefix..., key ] = (key?.split ':') ? []
    match = switch
      when not key? then @map[type]
      when prefix.length > 0 then @map[prefix[0]]?[type]?[key]
      else @map[type]?[key]
    match ?= @origin?.resolve? arguments... if opts.recurse is true
    unless match?
      console.debug? "[Origin:resolve] unable to find #{type}:#{key}" if opts.warn
    return match

  # convenience function
  copy:      synth.copy
  objectify: synth.objectify

  error: (msg, context) ->
    res = new Error msg
    res.context = context ? @map
    return res

  locate: (inside, path) ->
    return unless inside? and typeof path is 'string'
    if /^\//.test path

# origin - cascading symbol definitions

class Origin

  constructor: (@origin) -> @map = {}

  # returns the 'updated' defined object
  define: (keys..., value) ->
    exists = @resolve keys..., warn: false
    definition = @objectify (keys.join '.'), switch
      when not exists?             then value
      when exists.constructor is Object
        @copy exists, value
      else
