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