       @types[declaration.id] = type
     else
       throw new Error "assignType: #{name} is not declared"
-
 
   assignArity: (name, arity) ->
     (@_declarationInCurrentScope name).arity = arity

  currentDeclarations: ->
    cloneMap @_scope()

  assignType: (name, type) ->
    @assignTypeTo name, (@_declarationInCurrentScope name), type


      # log "adding top level lhs to deferred #{name}", deps
      currentType = type#substitute ctx.substitution, type
      ctx.addToDeferredBindings
        name: scopedName name, ctx.currentScopeIndex()
        id: name
        scopeIndex: ctx.currentScopeIndex()
        type: currentType
        constraints: constraints
