An experimental library using context types for event logic