Extracting type parameters from type with many parameters

Oh, I get it. A and B I can get via typeof on some already-existing struct fields; and for a0, a1, b0, b1 I just add some fields of type Val.