(<=:) :: Argument arg =>
         ((t -> IO t) -> a -> IO a)
      -> OptBuilding arg t
      -> OptM a ()
(<=:) sel builder = sel =: pushOption builder
    where
      defOptBuilder = OptBuilder
                        []
                        []
                        Nothing
                        Nothing
                        (error "Parser does not have an action")
      pushOption (OptBuilding builder) =
          let (OptBuilder short long metavar help setter) = builder defOptBuilder
          in  tell [ ParseOpt $ Option short long (argDescr setter metavar)
                                  (fromMaybe "(no description)" help)
                   ]

-- | Apply selector to options combinator
(<=:) :: Argument arg =>
         ((t -> IO t) -> a -> IO a)
      -> OptBuilding arg t
      -> OptM a ()
(<=:) sel builder = sel =: pushOption builder
    where
      defOptBuilder = OptBuilder
                        []
                        []
                        Nothing
                        Nothing
                        (error "Parser does not have an action")
      pushOption (OptBuilding builder) =
          let (OptBuilder short long metavar help setter) = builder defOptBuilder
          in  tell [ ParseOpt $ Option short long (argDescr setter metavar)
                                  (fromMaybe "(no description)" help)
                   ]

-- | Apply selector to options combinator
(<=:) sel builder = sel =: pushOption builder
    where
      defOptBuilder = OptBuilder
                        []
                        []
                        Nothing
                        Nothing
                        (error "Parser does not have an action")
      pushOption (OptBuilding builder) =
          let (OptBuilder short long metavar help setter) = builder defOptBuilder
          in  tell [ ParseOpt $ Option short long (argDescr setter metavar)
                                  (fromMaybe "(no description)" help)
                   ]

-- | Apply selector to options combinator