intg_opt :: [T.Text] -> (Int->a,a->Int) -> a -> OptEnum -> Opt a
intg_opt hp (inj,prj) x0 ce =
    Opt
        { opt_enum    = ce
        , opt_default = x0
        , opt_from    = frm
        , opt_to      = toJSON . prj
        , opt_help    = Help hp "<integer>"
        }
  where
    frm v =
        case fromJSON v of
          Success i -> inj i
          _         -> x0
intg_opt :: [T.Text] -> (Int->a,a->Int) -> a -> OptEnum -> Opt a
intg_opt hp (inj,prj) x0 ce =
    Opt
        { opt_enum    = ce
        , opt_default = x0
        , opt_from    = frm
        , opt_to      = toJSON . prj
        , opt_help    = Help hp "<integer>"
        }
  where
    frm v =
        case fromJSON v of
          Success i -> inj i
          _         -> x0
intg_opt hp (inj,prj) x0 ce =
    Opt
        { opt_enum    = ce
        , opt_default = x0
        , opt_from    = frm
        , opt_to      = toJSON . prj
        , opt_help    = Help hp "<integer>"
        }
  where
    frm v =
        case fromJSON v of
          Success i -> inj i
          _         -> x0