enumWithDefaultP :: forall a. (Eq a) => a -> NonEmpty (a, T.Text, T.Text) -> Parser a
enumWithDefaultP def =
  let
    p :: a -> T.Text -> T.Text -> Parser a
    p fp long' help' = flag' fp $
          long (T.unpack long')
      <>  help (T.unpack help')
    f :: (a, T.Text, T.Text) -> Parser a -> Parser a
    f (x, long', help') parser =
      p x long' (help' <> (if x == def then " (Default)" else "")) <|> parser
  in foldr f (pure def)
enumWithDefaultP :: forall a. (Eq a) => a -> NonEmpty (a, T.Text, T.Text) -> Parser a
enumWithDefaultP def =
  let
    p :: a -> T.Text -> T.Text -> Parser a
    p fp long' help' = flag' fp $
          long (T.unpack long')
      <>  help (T.unpack help')
    f :: (a, T.Text, T.Text) -> Parser a -> Parser a
    f (x, long', help') parser =
      p x long' (help' <> (if x == def then " (Default)" else "")) <|> parser
  in foldr f (pure def)
enumWithDefaultP def =
  let
    p :: a -> T.Text -> T.Text -> Parser a
    p fp long' help' = flag' fp $
          long (T.unpack long')
      <>  help (T.unpack help')
    f :: (a, T.Text, T.Text) -> Parser a -> Parser a
    f (x, long', help') parser =
      p x long' (help' <> (if x == def then " (Default)" else "")) <|> parser
  in foldr f (pure def)