Thanks for the answer! I think my situation is a bit different though. You use an enum in your struct while I use a struct in my enum. Nonetheless in the end it seemed to work the same.
and I just had to to:
type ProposalType = variant {
AddMember: Member;
Foo,
Bar
};
The reason it went wrong is because of using wrong names