rename when_ functions to use Haskell names.