{-# LANGUAGE NoImplicitPrelude     #-}
{-# LANGUAGE NoFieldSelectors      #-}

{-|
Module      : Stack.Types.GhciOpts
Description : Types related to Stack's @ghci@ and @repl@ commands.
License     : BSD-3-Clause

Types related to Stack's @ghci@ and @repl@ commands.
-}

module Stack.Types.GhciOpts
  ( GhciOpts (..)
  ) where

import           Stack.Prelude
import           Stack.Types.BuildOptsCLI ( ApplyCLIFlag (..) )

-- | Type respresenting command line options for Stack's @ghci@ and @repl@

-- commands.

data GhciOpts = GhciOpts
  { GhciOpts -> [Text]
targets            :: ![Text]
  , GhciOpts -> [String]
args               :: ![String]
  , GhciOpts -> [String]
ghcOptions         :: ![String]
  , GhciOpts -> Map ApplyCLIFlag (Map FlagName Bool)
flags              :: !(Map ApplyCLIFlag (Map FlagName Bool))
  , GhciOpts -> Maybe String
ghcCommand         :: !(Maybe FilePath)
  , GhciOpts -> Bool
noLoadModules      :: !Bool
  , GhciOpts -> [String]
additionalPackages :: ![String]
  , GhciOpts -> Maybe Text
mainIs             :: !(Maybe Text)
  , GhciOpts -> Bool
loadLocalDeps      :: !Bool
  , GhciOpts -> Maybe Bool
hidePackages       :: !(Maybe Bool)
  , GhciOpts -> Bool
noBuild            :: !Bool
  , GhciOpts -> Bool
onlyMain           :: !Bool
  }
  deriving Int -> GhciOpts -> ShowS
[GhciOpts] -> ShowS
GhciOpts -> String
(Int -> GhciOpts -> ShowS)
-> (GhciOpts -> String) -> ([GhciOpts] -> ShowS) -> Show GhciOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GhciOpts -> ShowS
showsPrec :: Int -> GhciOpts -> ShowS
$cshow :: GhciOpts -> String
show :: GhciOpts -> String
$cshowList :: [GhciOpts] -> ShowS
showList :: [GhciOpts] -> ShowS
Show