Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Logic and datatypes for parsing hie.yaml
files.
Synopsis
- readConfig :: FromJSON a => FilePath -> IO (Config a)
- newtype Config a = Config {
- cradle :: CradleConfig a
- data CradleConfig a = CradleConfig {
- cradleDependencies :: [FilePath]
- cradleTree :: CradleTree a
- data CabalType
- pattern CabalType :: Maybe String -> Maybe FilePath -> CabalType
- cabalComponent :: CabalType -> Maybe String
- cabalProjectFile :: CabalType -> Maybe FilePath
- data StackType
- pattern StackType :: Maybe String -> Maybe FilePath -> StackType
- stackComponent :: StackType -> Maybe String
- stackYaml :: StackType -> Maybe FilePath
- data CradleTree a
- = Cabal { }
- | CabalMulti {
- defaultCabal :: !CabalType
- subCabalComponents :: [(FilePath, CabalType)]
- | Stack { }
- | StackMulti {
- defaultStack :: !StackType
- subStackComponents :: [(FilePath, StackType)]
- | Bios { }
- | Direct { }
- | None
- | Multi [(FilePath, CradleConfig a)]
- | Other {
- otherConfig :: a
- originalYamlValue :: Value
- data Callable
Documentation
Configuration that can be used to load a Cradle
.
A configuration has roughly the following form:
cradle: cabal: component: "lib:hie-bios"
Config | |
|
data CradleConfig a Source #
CradleConfig | |
|
Instances
Functor CradleConfig Source # | |
Defined in HIE.Bios.Config fmap :: (a -> b) -> CradleConfig a -> CradleConfig b # (<$) :: a -> CradleConfig b -> CradleConfig a # | |
Show (CradleConfig a) Source # | |
Defined in HIE.Bios.Config showsPrec :: Int -> CradleConfig a -> ShowS # show :: CradleConfig a -> String # showList :: [CradleConfig a] -> ShowS # | |
Eq a => Eq (CradleConfig a) Source # | |
Defined in HIE.Bios.Config (==) :: CradleConfig a -> CradleConfig a -> Bool # (/=) :: CradleConfig a -> CradleConfig a -> Bool # |
A cabal yaml configuration consists of component configuration and project configuration.
The former specifies how we can find the compilation flags for any filepath in the project. There might be an explicit mapping from source directories to components, or we let cabal figure it out on its own.
Project configuration is the 'cabal.project' file, we is by default named 'cabal.project'. We allow to override that name to have an HLS specific project configuration file.
data CradleTree a Source #
Cabal | |
CabalMulti | |
| |
Stack | |
StackMulti | |
| |
Bios | |
| |
Direct | |
None | |
Multi [(FilePath, CradleConfig a)] | |
Other | |
|
Instances
Functor CradleTree Source # | |
Defined in HIE.Bios.Config fmap :: (a -> b) -> CradleTree a -> CradleTree b # (<$) :: a -> CradleTree b -> CradleTree a # | |
Show (CradleTree a) Source # | |
Defined in HIE.Bios.Config showsPrec :: Int -> CradleTree a -> ShowS # show :: CradleTree a -> String # showList :: [CradleTree a] -> ShowS # | |
Eq a => Eq (CradleTree a) Source # | |
Defined in HIE.Bios.Config (==) :: CradleTree a -> CradleTree a -> Bool # (/=) :: CradleTree a -> CradleTree a -> Bool # |