Motoko Request: Type Tuples

I’ve found some instances where it would be nice to use type tuples like:

public type Def = (MyClass, MyState, MyArgs);

And then later or in another class do something like

public class myInitier<(T, S, A)>(
  state: S,
  args: A,
  onInit: (T) -> ()
)  {
   let _state : S = state;
   let _args : A = args;

   let subClass = T(S,A);
   
   onInit(subClass);
};

This lets me put something like public type Def = (MyClass, MyState, MyArgs); in my class modules and it makes setting things up much cleaner.

 let x = myIniter<MyClass.Def>(state, args, onInit);

vs

 let x = myInter<MyClass.MyClass, MyClass.State, MyClass.Args>(state, args, onInit);

No, fraid not. That would require products at the kind level, which we don’t support. You get these kinds of features in theorem provers, but not many programming languages (apart from maybe Haskell and OCaml via modules)