(I'm not sure if this question is better suited for MathOverflow or here. I'll try here first, and move over to MO later if it appears to be more appropriate.)
Complexity theory can be very broadly described as the finer structure of the subsets of $\mathbb{N}$, or functions $\mathbb{N}\to\mathbb{N}$, constituting the Turing degree $\mathbf{0}$ (of computable sets), where we ask ourselves “OK, this set is computable by a Turing machine, now how much resources (time, memory, etc.) does it take to actually compute it?”.
This suggests the following natural question: is there some analogous theory for the finer structures of other Turing degrees, or Turing ideals?
Of particular interest would be $\mathbf{0}'$ (sets computable with an oracle solving the halting problem) or hyperarithmetic sets. One naïve attempt at creating a kind of complexity theory for $\mathbf{0}'$ (the simplest Turing degre beyond $\mathbf{0}$) would be to count the number of calls to the oracle as “resource” taken (or somewhat relatedly, simply use standard complexity classes like $\mathbf{P}$ and so on, but relativized to the halting oracle), but maybe this is too simplistic.
Hyperarithmetic sets are another interesting possibility because there is a classical analogy (due, I think, to Kreisel) between computability and hyperarithmetical theory, and “hyperarithmetic machines” can be described as Turing machines with access to a certain kind of generalized oracle (viz., the type-2 functional $\mathsf{E}$: intuitively, a hyperarithmetic machine can ask “does this (other) hyperarithmetic machine, which always terminates, ever produce a value $>0$?”, so we could try counting the number of times it does this); also, hyperarithmetic sets come with their own hierarchy from the Turing degrees (the hyperarithmetic hierarchy, constructed by transfinitely iterating the Turing jump up to $\omega_1^{\mathrm{CK}}$, which may or may not provide a satisfactory “complexity theory”.
So, anyway, have such theories been developed? I would expect that a natural analogue of $\mathbf{PR}$ (primitive recursive functions) is easy to define for higher Turing degrees, but what about finer classes like $\mathbf{P}$?