optionApplications :: String -> [Option] -> [C.Stm]
optionApplications chosen_option = zipWith check [(1::Int)..]
  where check i option =
          [C.cstm|if ($exp:cond) $stm:(optionAction option)|]
          where cond = case optionShortName option of
                         Nothing -> [C.cexp|$id:chosen_option == $int:i|]
                         Just c  -> [C.cexp|($id:chosen_option == $int:i) ||
                                            ($id:chosen_option == $char:c)|]
optionApplications :: String -> [Option] -> [C.Stm]
optionApplications chosen_option = zipWith check [(1::Int)..]
  where check i option =
          [C.cstm|if ($exp:cond) $stm:(optionAction option)|]
          where cond = case optionShortName option of
                         Nothing -> [C.cexp|$id:chosen_option == $int:i|]
                         Just c  -> [C.cexp|($id:chosen_option == $int:i) ||
                                            ($id:chosen_option == $char:c)|]
optionApplications chosen_option = zipWith check [(1::Int)..]
  where check i option =
          [C.cstm|if ($exp:cond) $stm:(optionAction option)|]
          where cond = case optionShortName option of
                         Nothing -> [C.cexp|$id:chosen_option == $int:i|]
                         Just c  -> [C.cexp|($id:chosen_option == $int:i) ||
                                            ($id:chosen_option == $char:c)|]