public function resolve()
    {
        // TODO: Make this dynamic.

        if (is_scalar($this->value)) {
            if (is_string($this->value)) {
                return ScalarTypes::SCALAR_STRING;
            } elseif (is_bool($this->value)) {
                return ScalarTypes::SCALAR_BOOLEAN;
            } elseif (is_integer($this->value)) {
                return ScalarTypes::SCALAR_INTEGER;
            } elseif (is_float($this->value)) {
                return ScalarTypes::SCALAR_FLOAT;
            }
        } elseif (is_array($this->value)) {
            return CompoundTypes::COMPOUND_ARRAY;
        } elseif (is_object($this->value)) {
            return CompoundTypes::COMPOUND_OBJECT;
        } elseif (is_resource($this->value)) {
            return SpecialTypes::SPECIAL_RESOURCE;
        } elseif ($this->value === null) {
            return SpecialTypes::SPECIAL_NULL;
        }

        throw new UnknownTypeException(gettype($this->value));
    }