 # $async                    = D.remit_async.bind D
 PS                        = require 'pipestreams'
 { $, $async, }            = PS
-new_pushable              = require 'pull-pushable'
+_new_push_source          = require 'pull-pushable'
 assign                    = Object.assign
 jr                        = JSON.stringify
 copy                      = ( P... ) -> assign {}, P...

#===========================================================================================================
# RECYCLING
#-----------------------------------------------------------------------------------------------------------
@unwrap_recycled = ( d ) ->
  ### Given an event, return its value if its a `~recycle` event; otherwise, return the event itself. ###
  return if ( @is_recycling d ) then d.value else d

#-----------------------------------------------------------------------------------------------------------
@$unwrap_recycled = ->
  return $ ( d, send ) => send @unwrap_recycled d

#-----------------------------------------------------------------------------------------------------------
@$recycle = ( sender ) ->
  return PS.$watch ( d ) =>
    if ( @is_recycling d ) then sender d


#===========================================================================================================

@new_stop_event     = ( key, value, other...  ) -> @new_event ')', key, value, other...
@new_system_event   = ( key, value, other...  ) -> @new_event '~', key, value, other...
@new_end_event      =                           -> @new_system_event 'end'
@new_text_event     = (      value, other...  ) -> @new_single_event 'text',    value, other...
@recycling          = ( d )                     -> @new_system_event 'recycle', d

#-----------------------------------------------------------------------------------------------------------
@new_warning = ( ref, message, d, other...  ) ->
  @new_system_event 'warning', d, { ref, message, }, other...


############################################################################################################
