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]
- cradleType :: CradleType a
- data CabalType
- pattern CabalType :: Maybe String -> CabalType
- cabalComponent :: CabalType -> Maybe String
- data StackType
- pattern StackType :: Maybe String -> Maybe String -> StackType
- stackComponent :: StackType -> Maybe String
- stackYaml :: StackType -> Maybe String
- data CradleType 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 # |
data CradleType a Source #
Cabal | |
CabalMulti | |
| |
Stack | |
StackMulti | |
| |
Bios | |
| |
Direct | |
None | |
Multi [(FilePath, CradleConfig a)] | |
Other | |
|
Instances
Functor CradleType Source # | |
Defined in HIE.Bios.Config fmap :: (a -> b) -> CradleType a -> CradleType b # (<$) :: a -> CradleType b -> CradleType a # | |
Show (CradleType a) Source # | |
Defined in HIE.Bios.Config showsPrec :: Int -> CradleType a -> ShowS # show :: CradleType a -> String # showList :: [CradleType a] -> ShowS # | |
Eq a => Eq (CradleType a) Source # | |
Defined in HIE.Bios.Config (==) :: CradleType a -> CradleType a -> Bool # (/=) :: CradleType a -> CradleType a -> Bool # |