Typedef to partially fix parameters

I have following class:

virtual class unpackTransactions#(int W, int I, type TXN);
      ...
endclass

and want to typedef a specific instance of this class where TXN equals for example my_transaction_type, whilst keeping W and I parameters.

Something like


typedef unpackTransactions#(W,I,my_transaction_type) U1#(int W, int I);

Is this possible? For now I went for:

virtual class unpackTransactions_Sink#(int W, int I) extends unpackTransactions#(W,I,sink_mon_txn);
endclass

as workaround, but it feels awkward.

In reply to NiLu:

It’s not possible to do what you want using a typedef. I wouldn’t bother with the extended class. If you have remember the _Sink suffix, you might as well just specify the sink_mon_txn type. It will be easier for people to read the code and not have the extra class layer which will most likely need another constructor.

The main reason I wanted the typedef is because I am expecting that in the future different TXN instantiations would need to diverge. It is just a short term optimization that the _Sink and _Src can “derive” from a single parameterized class.