A type system for RCL, part 2: The type system (ruudvanasseldonk.com)