blob: fd95b835e8838956da5ea91cb4192df144b57072 [file] [log] [blame]
Matthias Andreas Benkard262110d2021-08-24 06:35:55 +02001{-# LANGUAGE TypeApplications #-}
Matthias Andreas Benkard47eddb52024-08-30 18:47:33 +02002{-# LANGUAGE TypeOperators #-}
Matthias Andreas Benkard262110d2021-08-24 06:35:55 +02003{-# LANGUAGE UndecidableInstances #-}
4
5module Mulkup.Flags (Flags (..), flagParser) where
6
7import Mulkup.Prelude
8import Optics.TH
9import Options.Applicative
10 ( Parser,
11 help,
12 long,
13 short,
14 switch,
15 )
16
17data Flags = Flags
18 {verbose :: Bool}
19
20makeFieldLabelsNoPrefix ''Flags
21
22flagParser :: Parser Flags
23flagParser =
24 Flags <$> switch (long "verbose" <> short 'v' <> help "Log verbosely.")