def take(self, type):
    if (not isinstance(type, TypeConstant)):
        raise RuntimeError(('Non-constant type placed into typestack: %s' % type))
    if (len(self.given) > 0):
        last = self.given.pop()
        types_unify(type, last)
    else:
        self.taken.append(type)
def take(self, type):
    if (not isinstance(type, TypeConstant)):
        raise RuntimeError(('Non-constant type placed into typestack: %s' % type))
    if (len(self.given) > 0):
        last = self.given.pop()
        types_unify(type, last)
    else:
        self.taken.append(type)