   assignType: (name, type) ->
     # log "TYPE OF #{name}", printType type
     if declaration = (lookupInMap @_scope(), name)
-      if declaration.type
+      if declaration.type and declaration.type not instanceof TempType
         throw new Error "assignType: #{name} already has a type"
       declaration.type = type
     else

    !!(@_declaration name)

  isTyped: (name) ->
    !!(@_declaration name).type

  _declaration: (name) ->
    @_declarationInScope @scopes.length - 1, name

    # First get rid of instances of already resolved types
    unresolvedNames = newMap()
    for name, types of values names
      if (canonicalType = ctx.type name) and canonicalType not instanceof TempType
        for type in types
          unify ctx, type.type, (freshInstance ctx, canonicalType).type
      else
