ghc-mod-5.6.0.0: Happy Haskell Programming

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GhcMod.Types

Contents

- Orphan instances

Synopsis

- type IOish m = (Functor m, MonadIO m, MonadBaseControl IO m, ExceptionMonad m)
- type MonadIOC m = MonadIO m
- class MonadIOC m => MonadIO m where
- data OutputStyle
  - = LispStyle
  - | PlainStyle
- newtype LineSeparator = LineSeparator String
- data FileMapping = FileMapping {
  - fmPath :: FilePath
  - fmTemp :: Bool
  }
- type FileMappingMap = Map FilePath FileMapping
- data ProgramSource
  - = ProgramSourceUser
  - | ProgramSourceStack
- data Programs = Programs {
  - ghcProgram :: FilePath
  - ghcPkgProgram :: FilePath
  - cabalProgram :: FilePath
  - stackProgram :: FilePath
  }
- data OutputOpts = OutputOpts {
  - ooptLogLevel :: GmLogLevel
  - ooptStyle :: OutputStyle
  - ooptLineSeparator :: LineSeparator
  - ooptLinePrefix :: Maybe (String, String)
  }
- data Options = Options {
  - optOutput :: OutputOpts
  - optPrograms :: Programs
  - optGhcUserOptions :: [GHCOption]
  - optFileMappings :: [(FilePath, Maybe FilePath)]
  - optEncoding :: String
  }
- defaultOptions :: Options
- data Project
  - = CabalProject
  - | SandboxProject
  - | PlainProject
  - | StackProject StackEnv
- isCabalHelperProject :: Project -> Bool
- data StackEnv = StackEnv {
  - seDistDir :: FilePath
  - seBinPath :: [FilePath]
  - seSnapshotPkgDb :: FilePath
  - seLocalPkgDb :: FilePath
  }
- data Cradle = Cradle {
  - cradleProject :: Project
  - cradleCurrentDir :: FilePath
  - cradleRootDir :: FilePath
  - cradleTempDir :: FilePath
  - cradleCabalFile :: Maybe FilePath
  - cradleDistDir :: FilePath
  }
- data GmStream
  - = GmOutStream
  - | GmErrStream
- data GhcModEnv = GhcModEnv {
  - gmOptions :: Options
  - gmCradle :: Cradle
  }
- data GhcModOut = GhcModOut {
  - gmoOptions :: OutputOpts
  - gmoChan :: Chan (Either (MVar ()) (GmStream, String))
  }
- data GhcModLog = GhcModLog {
  - gmLogLevel :: Maybe GmLogLevel
  - gmLogVomitDump :: Last Bool
  - gmLogMessages :: [(GmLogLevel, String, Doc)]
  }
- data GmGhcSession = GmGhcSession {
  - gmgsOptions :: ![GHCOption]
  - gmgsSession :: !(IORef HscEnv)
  }
- data GhcModCaches = GhcModCaches {
  - gmcPackageDbStack :: CacheContents ChCacheData [GhcPkgDb]
  - gmcMergedPkgOptions :: CacheContents ChCacheData [GHCOption]
  - gmcComponents :: CacheContents ChCacheData [GmComponent GMCRaw ChEntrypoint]
  - gmcResolvedComponents :: CacheContents [GmComponent GMCRaw (Set ModulePath)] (Map ChComponentName (GmComponent GMCResolved (Set ModulePath)))
  }
- data GhcModState = GhcModState {
  - gmGhcSession :: !(Maybe GmGhcSession)
  - gmCaches :: !GhcModCaches
  - gmMMappedFiles :: !FileMappingMap
  }
- defaultGhcModState :: GhcModState
- data GhcPkgDb
  - = GlobalDb
  - | UserDb
  - | PackageDb String
- type GHCOption = String
- type IncludeDir = FilePath
- newtype Expression = Expression {
  - getExpression :: String
  }
- newtype ModuleString = ModuleString {
  - getModuleString :: String
  }
- data GmLogLevel
  - = GmSilent
  - | GmPanic
  - | GmException
  - | GmError
  - | GmWarning
  - | GmInfo
  - | GmDebug
  - | GmVomit
- data GmModuleGraph = GmModuleGraph {
  - gmgGraph :: Map ModulePath (Set ModulePath)
  }
- data GmComponentType
  - = GMCRaw
  - | GMCResolved
- data GmComponent t eps = GmComponent {
  - gmcHomeModuleGraph :: GmModuleGraph
  - gmcName :: ChComponentName
  - gmcGhcOpts :: [GHCOption]
  - gmcGhcPkgOpts :: [GHCOption]
  - gmcGhcSrcOpts :: [GHCOption]
  - gmcGhcLangOpts :: [GHCOption]
  - gmcRawEntrypoints :: ChEntrypoint
  - gmcEntrypoints :: eps
  - gmcSourceDirs :: [FilePath]
  }
- data ModulePath = ModulePath {
  - mpModule :: ModuleName
  - mpPath :: FilePath
  }
- data GhcModError
  - = GMENoMsg
  - | GMEString String
  - | GMECabalConfigure GhcModError
  - | GMEStackConfigure GhcModError
  - | GMEStackBootstrap GhcModError
  - | GMECabalCompAssignment [(Either FilePath ModuleName, Set ChComponentName)]
  - | GMEProcess String String [String] (Either Int GhcModError)
  - | GMENoCabalFile
  - | GMETooManyCabalFiles [FilePath]
- data LintOpts = LintOpts {
  - optLintHlintOpts :: [String]
  }
- defaultLintOpts :: LintOpts
- data BrowseOpts = BrowseOpts {
  - optBrowseOperators :: Bool
  - optBrowseDetailed :: Bool
  - optBrowseParents :: Bool
  - optBrowseQualified :: Bool
  }
- defaultBrowseOpts :: BrowseOpts
- lGmcResolvedComponents :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents [GmComponent GMCRaw (Set ModulePath)] (Map ChComponentName (GmComponent GMCResolved (Set ModulePath))))
- lGmcPackageDbStack :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents ChCacheData [GhcPkgDb])
- lGmcMergedPkgOptions :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents ChCacheData [GHCOption])
- lGmcComponents :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents ChCacheData [GmComponent GMCRaw ChEntrypoint])
- lGmMMappedFiles :: forall cat. ArrowApply cat => Lens cat GhcModState FileMappingMap
- lGmGhcSession :: forall cat. ArrowApply cat => Lens cat GhcModState (Maybe GmGhcSession)
- lGmCaches :: forall cat. ArrowApply cat => Lens cat GhcModState GhcModCaches
- lOptPrograms :: forall cat. ArrowApply cat => Lens cat Options Programs
- lOptOutput :: forall cat. ArrowApply cat => Lens cat Options OutputOpts
- lOptGhcUserOptions :: forall cat. ArrowApply cat => Lens cat Options [GHCOption]
- lOptFileMappings :: forall cat. ArrowApply cat => Lens cat Options [(FilePath, Maybe FilePath)]
- lOptEncoding :: forall cat. ArrowApply cat => Lens cat Options String
- lOoptStyle :: forall cat. ArrowApply cat => Lens cat OutputOpts OutputStyle
- lOoptLogLevel :: forall cat. ArrowApply cat => Lens cat OutputOpts GmLogLevel
- lOoptLineSeparator :: forall cat. ArrowApply cat => Lens cat OutputOpts LineSeparator
- lOoptLinePrefix :: forall cat. ArrowApply cat => Lens cat OutputOpts (Maybe (String, String))
- lStackProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath
- lGhcProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath
- lGhcPkgProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath
- lCabalProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath
- data ModuleName :: *
- mkModuleName :: String -> ModuleName
- moduleNameString :: ModuleName -> String

# Documentation

type IOish m = (Functor m, MonadIO m, MonadBaseControl IO m, ExceptionMonad m) #

A constraint alias (-XConstraintKinds) to make functions dealing with `GhcModT` somewhat cleaner.

Basicially an `IOish m => m` is a `Monad` supporting arbitrary `IO` and exception handling. Usually this will simply be `IO` but we parametrise it in the exported API so users have the option to use a custom inner monad.

type MonadIOC m = MonadIO m #

class MonadIOC m => MonadIO m where #

Minimal complete definition

liftIO

Methods

liftIO :: IO a -> m a #

data OutputStyle #

Output style.

Constructors

LispStyle | S expression style.
PlainStyle | Plain textstyle.

Instances

Show OutputStyle # |
Methods showsPrec :: Int -> OutputStyle -> ShowS # show :: OutputStyle -> String # showList :: [OutputStyle] -> ShowS #

newtype LineSeparator #

The type for line separator. Historically, a Null string is used.

Constructors

LineSeparator String |

Instances

Show LineSeparator # |
Methods showsPrec :: Int -> LineSeparator -> ShowS # show :: LineSeparator -> String # showList :: [LineSeparator] -> ShowS #

data FileMapping #

Constructors

FileMapping |
Fields fmPath :: FilePath fmTemp :: Bool

Instances

Eq FileMapping # |
Methods (==) :: FileMapping -> FileMapping -> Bool # (/=) :: FileMapping -> FileMapping -> Bool #
Show FileMapping # |
Methods showsPrec :: Int -> FileMapping -> ShowS # show :: FileMapping -> String # showList :: [FileMapping] -> ShowS #

type FileMappingMap = Map FilePath FileMapping #

data ProgramSource #

Constructors

ProgramSourceUser |
ProgramSourceStack |

data Programs #

Constructors

Programs |
Fields ghcProgram :: FilePath `ghc` program name. ghcPkgProgram :: FilePath `ghc-pkg` program name. cabalProgram :: FilePath `cabal` program name. stackProgram :: FilePath `stack` program name.

Instances

Show Programs # |
Methods showsPrec :: Int -> Programs -> ShowS # show :: Programs -> String # showList :: [Programs] -> ShowS #

data OutputOpts #

Constructors

OutputOpts |
Fields ooptLogLevel :: GmLogLevel Verbosity ooptStyle :: OutputStyle ooptLineSeparator :: LineSeparator Line separator string. ooptLinePrefix :: Maybe (String, String) Stdout/err line multiplexing using prefix encoding. `fst` is stdout, `snd` is stderr prefix.

Instances

Show OutputOpts # |
Methods showsPrec :: Int -> OutputOpts -> ShowS # show :: OutputOpts -> String # showList :: [OutputOpts] -> ShowS #

data Options #

Constructors

Options |
Fields optOutput :: OutputOpts optPrograms :: Programs optGhcUserOptions :: [GHCOption] GHC command line options set on the `ghc-mod` command line optFileMappings :: [(FilePath, Maybe FilePath)] optEncoding :: String

Instances

Show Options # |
Methods showsPrec :: Int -> Options -> ShowS # show :: Options -> String # showList :: [Options] -> ShowS #

defaultOptions :: Options #

A default `Options`.

data Project #

Constructors

CabalProject |
SandboxProject |
PlainProject |
StackProject StackEnv |

Instances

Eq Project # |
Methods (==) :: Project -> Project -> Bool # (/=) :: Project -> Project -> Bool #
Ord Project # |
Methods compare :: Project -> Project -> Ordering # (<) :: Project -> Project -> Bool # (<=) :: Project -> Project -> Bool # (>) :: Project -> Project -> Bool # (>=) :: Project -> Project -> Bool # max :: Project -> Project -> Project # min :: Project -> Project -> Project #
Show Project # |
Methods showsPrec :: Int -> Project -> ShowS # show :: Project -> String # showList :: [Project] -> ShowS #

isCabalHelperProject :: Project -> Bool #

data StackEnv #

Constructors

StackEnv |
Fields seDistDir :: FilePath seBinPath :: [FilePath] seSnapshotPkgDb :: FilePath seLocalPkgDb :: FilePath

Instances

Eq StackEnv # |
Methods (==) :: StackEnv -> StackEnv -> Bool # (/=) :: StackEnv -> StackEnv -> Bool #
Ord StackEnv # |
Methods compare :: StackEnv -> StackEnv -> Ordering # (<) :: StackEnv -> StackEnv -> Bool # (<=) :: StackEnv -> StackEnv -> Bool # (>) :: StackEnv -> StackEnv -> Bool # (>=) :: StackEnv -> StackEnv -> Bool # max :: StackEnv -> StackEnv -> StackEnv # min :: StackEnv -> StackEnv -> StackEnv #
Show StackEnv # |
Methods showsPrec :: Int -> StackEnv -> ShowS # show :: StackEnv -> String # showList :: [StackEnv] -> ShowS #

data Cradle #

The environment where this library is used.

Constructors

Cradle |
Fields cradleProject :: Project cradleCurrentDir :: FilePath The directory where this library is executed. cradleRootDir :: FilePath The project root directory. cradleTempDir :: FilePath Per-Project temporary directory cradleCabalFile :: Maybe FilePath The file name of the found cabal file. cradleDistDir :: FilePath The build info directory.

Instances

Eq Cradle # |
Methods (==) :: Cradle -> Cradle -> Bool # (/=) :: Cradle -> Cradle -> Bool #
Ord Cradle # |
Methods compare :: Cradle -> Cradle -> Ordering # (<) :: Cradle -> Cradle -> Bool # (<=) :: Cradle -> Cradle -> Bool # (>) :: Cradle -> Cradle -> Bool # (>=) :: Cradle -> Cradle -> Bool # max :: Cradle -> Cradle -> Cradle # min :: Cradle -> Cradle -> Cradle #
Show Cradle # |
Methods showsPrec :: Int -> Cradle -> ShowS # show :: Cradle -> String # showList :: [Cradle] -> ShowS #

data GmStream #

Constructors

GmOutStream |
GmErrStream |

Instances

Show GmStream # |
Methods showsPrec :: Int -> GmStream -> ShowS # show :: GmStream -> String # showList :: [GmStream] -> ShowS #

data GhcModEnv #

Constructors

GhcModEnv |
Fields gmOptions :: Options gmCradle :: Cradle

data GhcModOut #

Constructors

GhcModOut |
Fields gmoOptions :: OutputOpts gmoChan :: Chan (Either (MVar ()) (GmStream, String))

data GhcModLog #

Constructors

GhcModLog |
Fields gmLogLevel :: Maybe GmLogLevel gmLogVomitDump :: Last Bool gmLogMessages :: [(GmLogLevel, String, Doc)]

Instances

Show GhcModLog # |
Methods showsPrec :: Int -> GhcModLog -> ShowS # show :: GhcModLog -> String # showList :: [GhcModLog] -> ShowS #
Monoid GhcModLog # |
Methods mempty :: GhcModLog # mappend :: GhcModLog -> GhcModLog -> GhcModLog # mconcat :: [GhcModLog] -> GhcModLog #
Monad m => MonadJournal GhcModLog (GmT m) # |
Methods journal :: GhcModLog -> GmT m () # history :: GmT m GhcModLog # clear :: GmT m () #
GmEnv m => GmEnv (JournalT GhcModLog m) # |
Methods gmeAsk :: JournalT GhcModLog m GhcModEnv # gmeReader :: (GhcModEnv -> a) -> JournalT GhcModLog m a # gmeLocal :: (GhcModEnv -> GhcModEnv) -> JournalT GhcModLog m a -> JournalT GhcModLog m a #
Monad m => GmLog (JournalT GhcModLog m) # |
Methods gmlJournal :: GhcModLog -> JournalT GhcModLog m () # gmlHistory :: JournalT GhcModLog m GhcModLog # gmlClear :: JournalT GhcModLog m () #

data GmGhcSession #

Constructors

GmGhcSession |
Fields gmgsOptions :: ![GHCOption] gmgsSession :: !(IORef HscEnv)

data GhcModCaches #

Constructors

GhcModCaches |
Fields gmcPackageDbStack :: CacheContents ChCacheData [GhcPkgDb] gmcMergedPkgOptions :: CacheContents ChCacheData [GHCOption] gmcComponents :: CacheContents ChCacheData [GmComponent GMCRaw ChEntrypoint] gmcResolvedComponents :: CacheContents [GmComponent GMCRaw (Set ModulePath)] (Map ChComponentName (GmComponent GMCResolved (Set ModulePath)))

data GhcModState #

Constructors

GhcModState |
Fields gmGhcSession :: !(Maybe GmGhcSession) gmCaches :: !GhcModCaches gmMMappedFiles :: !FileMappingMap

Instances

Monad m => GmState (StateT GhcModState m) # |
Methods gmsGet :: StateT GhcModState m GhcModState # gmsPut :: GhcModState -> StateT GhcModState m () # gmsState :: (GhcModState -> (a, GhcModState)) -> StateT GhcModState m a #

defaultGhcModState :: GhcModState #

data GhcPkgDb #

GHC package database flags.

Constructors

GlobalDb |
UserDb |
PackageDb String |

Instances

Eq GhcPkgDb # |
Methods (==) :: GhcPkgDb -> GhcPkgDb -> Bool # (/=) :: GhcPkgDb -> GhcPkgDb -> Bool #
Show GhcPkgDb # |
Methods showsPrec :: Int -> GhcPkgDb -> ShowS # show :: GhcPkgDb -> String # showList :: [GhcPkgDb] -> ShowS #
Generic GhcPkgDb # |
Associated Types type Rep GhcPkgDb :: * -> * # Methods from :: GhcPkgDb -> Rep GhcPkgDb x # to :: Rep GhcPkgDb x -> GhcPkgDb #
Binary GhcPkgDb # |
Methods put :: GhcPkgDb -> Put # get :: Get GhcPkgDb # putList :: [GhcPkgDb] -> Put #
type Rep GhcPkgDb # |
type Rep GhcPkgDb = D1 (MetaData "GhcPkgDb" "Language.Haskell.GhcMod.Types" "ghc-mod-5.6.0.0-6EebjJ3jbsw2Ob0WDei3XP" False) ((:+:) (C1 (MetaCons "GlobalDb" PrefixI False) U1) ((:+:) (C1 (MetaCons "UserDb" PrefixI False) U1) (C1 (MetaCons "PackageDb" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))))

type GHCOption = String #

A single GHC command line option.

type IncludeDir = FilePath #

An include directory for modules.

newtype Expression #

Haskell expression.

Constructors

Expression |
Fields getExpression :: String

Instances

Eq Expression # |
Methods (==) :: Expression -> Expression -> Bool # (/=) :: Expression -> Expression -> Bool #
Ord Expression # |
Methods compare :: Expression -> Expression -> Ordering # (<) :: Expression -> Expression -> Bool # (<=) :: Expression -> Expression -> Bool # (>) :: Expression -> Expression -> Bool # (>=) :: Expression -> Expression -> Bool # max :: Expression -> Expression -> Expression # min :: Expression -> Expression -> Expression #
Show Expression # |
Methods showsPrec :: Int -> Expression -> ShowS # show :: Expression -> String # showList :: [Expression] -> ShowS #

newtype ModuleString #

Module name.

Constructors

ModuleString |
Fields getModuleString :: String

Instances

Eq ModuleString # |
Methods (==) :: ModuleString -> ModuleString -> Bool # (/=) :: ModuleString -> ModuleString -> Bool #
Ord ModuleString # |
Methods compare :: ModuleString -> ModuleString -> Ordering # (<) :: ModuleString -> ModuleString -> Bool # (<=) :: ModuleString -> ModuleString -> Bool # (>) :: ModuleString -> ModuleString -> Bool # (>=) :: ModuleString -> ModuleString -> Bool # max :: ModuleString -> ModuleString -> ModuleString # min :: ModuleString -> ModuleString -> ModuleString #
Show ModuleString # |
Methods showsPrec :: Int -> ModuleString -> ShowS # show :: ModuleString -> String # showList :: [ModuleString] -> ShowS #
Binary ModuleString # |
Methods put :: ModuleString -> Put # get :: Get ModuleString # putList :: [ModuleString] -> Put #
NFData ModuleString # |
Methods rnf :: ModuleString -> () #

data GmLogLevel #

Constructors

GmSilent |
GmPanic |
GmException |
GmError |
GmWarning |
GmInfo |
GmDebug |
GmVomit |

Instances

Bounded GmLogLevel # |
Methods minBound :: GmLogLevel # maxBound :: GmLogLevel #
Enum GmLogLevel # |
Methods succ :: GmLogLevel -> GmLogLevel # pred :: GmLogLevel -> GmLogLevel # toEnum :: Int -> GmLogLevel # fromEnum :: GmLogLevel -> Int # enumFrom :: GmLogLevel -> [GmLogLevel] # enumFromThen :: GmLogLevel -> GmLogLevel -> [GmLogLevel] # enumFromTo :: GmLogLevel -> GmLogLevel -> [GmLogLevel] # enumFromThenTo :: GmLogLevel -> GmLogLevel -> GmLogLevel -> [GmLogLevel] #
Eq GmLogLevel # |
Methods (==) :: GmLogLevel -> GmLogLevel -> Bool # (/=) :: GmLogLevel -> GmLogLevel -> Bool #
Ord GmLogLevel # |
Methods compare :: GmLogLevel -> GmLogLevel -> Ordering # (<) :: GmLogLevel -> GmLogLevel -> Bool # (<=) :: GmLogLevel -> GmLogLevel -> Bool # (>) :: GmLogLevel -> GmLogLevel -> Bool # (>=) :: GmLogLevel -> GmLogLevel -> Bool # max :: GmLogLevel -> GmLogLevel -> GmLogLevel # min :: GmLogLevel -> GmLogLevel -> GmLogLevel #
Read GmLogLevel # |
Methods readsPrec :: Int -> ReadS GmLogLevel # readList :: ReadS [GmLogLevel] # readPrec :: ReadPrec GmLogLevel # readListPrec :: ReadPrec [GmLogLevel] #
Show GmLogLevel # |
Methods showsPrec :: Int -> GmLogLevel -> ShowS # show :: GmLogLevel -> String # showList :: [GmLogLevel] -> ShowS #

data GmModuleGraph #

Constructors

GmModuleGraph |
Fields gmgGraph :: Map ModulePath (Set ModulePath)

Instances

Eq GmModuleGraph # |
Methods (==) :: GmModuleGraph -> GmModuleGraph -> Bool # (/=) :: GmModuleGraph -> GmModuleGraph -> Bool #
Ord GmModuleGraph # |
Methods compare :: GmModuleGraph -> GmModuleGraph -> Ordering # (<) :: GmModuleGraph -> GmModuleGraph -> Bool # (<=) :: GmModuleGraph -> GmModuleGraph -> Bool # (>) :: GmModuleGraph -> GmModuleGraph -> Bool # (>=) :: GmModuleGraph -> GmModuleGraph -> Bool # max :: GmModuleGraph -> GmModuleGraph -> GmModuleGraph # min :: GmModuleGraph -> GmModuleGraph -> GmModuleGraph #
Read GmModuleGraph # |
Methods readsPrec :: Int -> ReadS GmModuleGraph # readList :: ReadS [GmModuleGraph] # readPrec :: ReadPrec GmModuleGraph # readListPrec :: ReadPrec [GmModuleGraph] #
Show GmModuleGraph # |
Methods showsPrec :: Int -> GmModuleGraph -> ShowS # show :: GmModuleGraph -> String # showList :: [GmModuleGraph] -> ShowS #
Generic GmModuleGraph # |
Associated Types type Rep GmModuleGraph :: * -> * # Methods from :: GmModuleGraph -> Rep GmModuleGraph x # to :: Rep GmModuleGraph x -> GmModuleGraph #
Monoid GmModuleGraph # |
Methods mempty :: GmModuleGraph # mappend :: GmModuleGraph -> GmModuleGraph -> GmModuleGraph # mconcat :: [GmModuleGraph] -> GmModuleGraph #
Binary GmModuleGraph # |
Methods put :: GmModuleGraph -> Put # get :: Get GmModuleGraph # putList :: [GmModuleGraph] -> Put #
type Rep GmModuleGraph # |
type Rep GmModuleGraph = D1 (MetaData "GmModuleGraph" "Language.Haskell.GhcMod.Types" "ghc-mod-5.6.0.0-6EebjJ3jbsw2Ob0WDei3XP" False) (C1 (MetaCons "GmModuleGraph" PrefixI True) (S1 (MetaSel (Just Symbol "gmgGraph") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map ModulePath (Set ModulePath)))))

data GmComponentType #

Constructors

GMCRaw |
GMCResolved |

data GmComponent t eps #

Constructors

GmComponent |
Fields gmcHomeModuleGraph :: GmModuleGraph gmcName :: ChComponentName gmcGhcOpts :: [GHCOption] gmcGhcPkgOpts :: [GHCOption] gmcGhcSrcOpts :: [GHCOption] gmcGhcLangOpts :: [GHCOption] gmcRawEntrypoints :: ChEntrypoint gmcEntrypoints :: eps gmcSourceDirs :: [FilePath]

Instances

Functor (GmComponent t) # |
Methods fmap :: (a -> b) -> GmComponent t a -> GmComponent t b # (<$) :: a -> GmComponent t b -> GmComponent t a #
Eq eps => Eq (GmComponent t eps) # |
Methods (==) :: GmComponent t eps -> GmComponent t eps -> Bool # (/=) :: GmComponent t eps -> GmComponent t eps -> Bool #
Ord eps => Ord (GmComponent t eps) # |
Methods compare :: GmComponent t eps -> GmComponent t eps -> Ordering # (<) :: GmComponent t eps -> GmComponent t eps -> Bool # (<=) :: GmComponent t eps -> GmComponent t eps -> Bool # (>) :: GmComponent t eps -> GmComponent t eps -> Bool # (>=) :: GmComponent t eps -> GmComponent t eps -> Bool # max :: GmComponent t eps -> GmComponent t eps -> GmComponent t eps # min :: GmComponent t eps -> GmComponent t eps -> GmComponent t eps #
Read eps => Read (GmComponent t eps) # |
Methods readsPrec :: Int -> ReadS (GmComponent t eps) # readList :: ReadS [GmComponent t eps] # readPrec :: ReadPrec (GmComponent t eps) # readListPrec :: ReadPrec [GmComponent t eps] #
Show eps => Show (GmComponent t eps) # |
Methods showsPrec :: Int -> GmComponent t eps -> ShowS # show :: GmComponent t eps -> String # showList :: [GmComponent t eps] -> ShowS #
Generic (GmComponent t eps) # |
Associated Types type Rep (GmComponent t eps) :: * -> * # Methods from :: GmComponent t eps -> Rep (GmComponent t eps) x # to :: Rep (GmComponent t eps) x -> GmComponent t eps #
Binary eps => Binary (GmComponent t eps) # |
Methods put :: GmComponent t eps -> Put # get :: Get (GmComponent t eps) # putList :: [GmComponent t eps] -> Put #
type Rep (GmComponent t eps) # |
type Rep (GmComponent t eps) = D1 (MetaData "GmComponent" "Language.Haskell.GhcMod.Types" "ghc-mod-5.6.0.0-6EebjJ3jbsw2Ob0WDei3XP" False) (C1 (MetaCons "GmComponent" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "gmcHomeModuleGraph") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GmModuleGraph)) (S1 (MetaSel (Just Symbol "gmcName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ChComponentName))) ((:*:) (S1 (MetaSel (Just Symbol "gmcGhcOpts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [GHCOption])) (S1 (MetaSel (Just Symbol "gmcGhcPkgOpts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [GHCOption])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "gmcGhcSrcOpts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [GHCOption])) (S1 (MetaSel (Just Symbol "gmcGhcLangOpts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [GHCOption]))) ((:*:) (S1 (MetaSel (Just Symbol "gmcRawEntrypoints") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ChEntrypoint)) ((:*:) (S1 (MetaSel (Just Symbol "gmcEntrypoints") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 eps)) (S1 (MetaSel (Just Symbol "gmcSourceDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])))))))

data ModulePath #

Constructors

ModulePath |
Fields mpModule :: ModuleName mpPath :: FilePath

Instances

Eq ModulePath # |
Methods (==) :: ModulePath -> ModulePath -> Bool # (/=) :: ModulePath -> ModulePath -> Bool #
Ord ModulePath # |
Methods compare :: ModulePath -> ModulePath -> Ordering # (<) :: ModulePath -> ModulePath -> Bool # (<=) :: ModulePath -> ModulePath -> Bool # (>) :: ModulePath -> ModulePath -> Bool # (>=) :: ModulePath -> ModulePath -> Bool # max :: ModulePath -> ModulePath -> ModulePath # min :: ModulePath -> ModulePath -> ModulePath #
Read ModulePath # |
Methods readsPrec :: Int -> ReadS ModulePath # readList :: ReadS [ModulePath] # readPrec :: ReadPrec ModulePath # readListPrec :: ReadPrec [ModulePath] #
Show ModulePath # |
Methods showsPrec :: Int -> ModulePath -> ShowS # show :: ModulePath -> String # showList :: [ModulePath] -> ShowS #
Generic ModulePath # |
Associated Types type Rep ModulePath :: * -> * # Methods from :: ModulePath -> Rep ModulePath x # to :: Rep ModulePath x -> ModulePath #
Binary ModulePath # |
Methods put :: ModulePath -> Put # get :: Get ModulePath # putList :: [ModulePath] -> Put #
type Rep ModulePath # |
type Rep ModulePath = D1 (MetaData "ModulePath" "Language.Haskell.GhcMod.Types" "ghc-mod-5.6.0.0-6EebjJ3jbsw2Ob0WDei3XP" False) (C1 (MetaCons "ModulePath" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "mpModule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ModuleName)) (S1 (MetaSel (Just Symbol "mpPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath))))

data GhcModError #

Constructors

GMENoMsg | Unknown error
GMEString String | Some Error with a message. These are produced mostly by `fail` calls on GhcModT.
GMECabalConfigure GhcModError | Configuring a cabal project failed.
GMEStackConfigure GhcModError | Configuring a stack project failed.
GMEStackBootstrap GhcModError | Bootstrapping `stack` environment failed (process exited with failure)
GMECabalCompAssignment [(Either FilePath ModuleName, Set ChComponentName)] | Could not find a consistent component assignment for modules
GMEProcess String String [String] (Either Int GhcModError) | Launching an operating system process failed. Fields in order: function, command, arguments, (stdout, stderr, exitcode)
GMENoCabalFile | No cabal file found.
GMETooManyCabalFiles [FilePath] | Too many cabal files found.

Instances

Eq GhcModError # |
Methods (==) :: GhcModError -> GhcModError -> Bool # (/=) :: GhcModError -> GhcModError -> Bool #
Show GhcModError # |
Methods showsPrec :: Int -> GhcModError -> ShowS # show :: GhcModError -> String # showList :: [GhcModError] -> ShowS #
Exception GhcModError # |
Methods toException :: GhcModError -> SomeException # fromException :: SomeException -> Maybe GhcModError # displayException :: GhcModError -> String #
Error GhcModError # |
Methods noMsg :: GhcModError # strMsg :: String -> GhcModError #
Monad m => MonadError GhcModError (GmlT m) # |
Methods throwError :: GhcModError -> GmlT m a # catchError :: GmlT m a -> (GhcModError -> GmlT m a) -> GmlT m a #
Monad m => MonadError GhcModError (GmT m) # |
Methods throwError :: GhcModError -> GmT m a # catchError :: GmT m a -> (GhcModError -> GmT m a) -> GmT m a #
GmEnv m => GmEnv (ErrorT GhcModError m) # |
Methods gmeAsk :: ErrorT GhcModError m GhcModEnv # gmeReader :: (GhcModEnv -> a) -> ErrorT GhcModError m a # gmeLocal :: (GhcModEnv -> GhcModEnv) -> ErrorT GhcModError m a -> ErrorT GhcModError m a #

data LintOpts #

Options for "lintWith" function

Constructors

LintOpts |
Fields optLintHlintOpts :: [String] options that will be passed to hlint executable

Instances

Show LintOpts # |
Methods showsPrec :: Int -> LintOpts -> ShowS # show :: LintOpts -> String # showList :: [LintOpts] -> ShowS #

defaultLintOpts :: LintOpts #

Default LintOpts instance

data BrowseOpts #

Options for "browseWith" function

Constructors

BrowseOpts |
Fields optBrowseOperators :: Bool If `True`, "browseWith" also returns operators. optBrowseDetailed :: Bool If `True`, "browseWith" also returns types. optBrowseParents :: Bool If `True`, "browseWith" also returns parents. optBrowseQualified :: Bool If `True`, "browseWith" will return fully qualified name

Instances

Show BrowseOpts # |
Methods showsPrec :: Int -> BrowseOpts -> ShowS # show :: BrowseOpts -> String # showList :: [BrowseOpts] -> ShowS #

defaultBrowseOpts :: BrowseOpts #

Default BrowseOpts instance

lGmcResolvedComponents :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents [GmComponent GMCRaw (Set ModulePath)] (Map ChComponentName (GmComponent GMCResolved (Set ModulePath)))) #

lGmcPackageDbStack :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents ChCacheData [GhcPkgDb]) #

lGmcMergedPkgOptions :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents ChCacheData [GHCOption]) #

lGmcComponents :: forall cat. ArrowApply cat => Lens cat GhcModCaches (CacheContents ChCacheData [GmComponent GMCRaw ChEntrypoint]) #

lGmMMappedFiles :: forall cat. ArrowApply cat => Lens cat GhcModState FileMappingMap #

lGmGhcSession :: forall cat. ArrowApply cat => Lens cat GhcModState (Maybe GmGhcSession) #

lGmCaches :: forall cat. ArrowApply cat => Lens cat GhcModState GhcModCaches #

lOptPrograms :: forall cat. ArrowApply cat => Lens cat Options Programs #

lOptOutput :: forall cat. ArrowApply cat => Lens cat Options OutputOpts #

lOptGhcUserOptions :: forall cat. ArrowApply cat => Lens cat Options [GHCOption] #

lOptFileMappings :: forall cat. ArrowApply cat => Lens cat Options [(FilePath, Maybe FilePath)] #

lOptEncoding :: forall cat. ArrowApply cat => Lens cat Options String #

lOoptStyle :: forall cat. ArrowApply cat => Lens cat OutputOpts OutputStyle #

lOoptLogLevel :: forall cat. ArrowApply cat => Lens cat OutputOpts GmLogLevel #

lOoptLineSeparator :: forall cat. ArrowApply cat => Lens cat OutputOpts LineSeparator #

lOoptLinePrefix :: forall cat. ArrowApply cat => Lens cat OutputOpts (Maybe (String, String)) #

lStackProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath #

lGhcProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath #

lGhcPkgProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath #

lCabalProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath #

data ModuleName :: * #

A ModuleName is essentially a simple string, e.g. `Data.List`.

Instances

Eq ModuleName |
Methods (==) :: ModuleName -> ModuleName -> Bool # (/=) :: ModuleName -> ModuleName -> Bool #
Data ModuleName |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleName -> c ModuleName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleName # toConstr :: ModuleName -> Constr # dataTypeOf :: ModuleName -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ModuleName) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleName) # gmapT :: (forall b. Data b => b -> b) -> ModuleName -> ModuleName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r # gmapQ :: (forall d. Data d => d -> u) -> ModuleName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #
Ord ModuleName |
Methods compare :: ModuleName -> ModuleName -> Ordering # (<) :: ModuleName -> ModuleName -> Bool # (<=) :: ModuleName -> ModuleName -> Bool # (>) :: ModuleName -> ModuleName -> Bool # (>=) :: ModuleName -> ModuleName -> Bool # max :: ModuleName -> ModuleName -> ModuleName # min :: ModuleName -> ModuleName -> ModuleName #
Binary ModuleName |
Methods put_ :: BinHandle -> ModuleName -> IO () # put :: BinHandle -> ModuleName -> IO (Bin ModuleName) # get :: BinHandle -> IO ModuleName #
Uniquable ModuleName |
Methods getUnique :: ModuleName -> Unique #
Outputable ModuleName |
Methods ppr :: ModuleName -> SDoc # pprPrec :: Rational -> ModuleName -> SDoc #
BinaryStringRep ModuleName |
Methods fromStringRep :: ByteString -> ModuleName # toStringRep :: ModuleName -> ByteString #

mkModuleName :: String -> ModuleName #

moduleNameString :: ModuleName -> String #

# Orphan instances

Read ModuleName # |
Methods readsPrec :: Int -> ReadS ModuleName # readList :: ReadS [ModuleName] # readPrec :: ReadPrec ModuleName # readListPrec :: ReadPrec [ModuleName] #
Show ModuleName # |
Methods showsPrec :: Int -> ModuleName -> ShowS # show :: ModuleName -> String # showList :: [ModuleName] -> ShowS #
Binary Programs # |
Methods put :: Programs -> Put # get :: Get Programs # putList :: [Programs] -> Put #
Binary ChModuleName # |
Methods put :: ChModuleName -> Put # get :: Get ChModuleName # putList :: [ChModuleName] -> Put #
Binary ChComponentName # |
Methods put :: ChComponentName -> Put # get :: Get ChComponentName # putList :: [ChComponentName] -> Put #
Binary ChEntrypoint # |
Methods put :: ChEntrypoint -> Put # get :: Get ChEntrypoint # putList :: [ChEntrypoint] -> Put #
Binary ModuleName # |
Methods put :: ModuleName -> Put # get :: Get ModuleName # putList :: [ModuleName] -> Put #