hie-bios-0.5.0: Set up a GHC API session

Safe HaskellNone
LanguageHaskell2010

HIE.Bios.Config

Description

Logic and datatypes for parsing hie.yaml files.

Synopsis

Documentation

readConfig :: FromJSON a => FilePath -> IO (Config a) Source #

Decode given file to a 'Config a' value. Type variable a can be used to extend the 'hie.yaml' file format to extend configuration in the user-library. If the contents of the file is not a valid 'Config a', an IOException is thrown.

newtype Config a Source #

Configuration that can be used to load a Cradle. A configuration has roughly the following form:

cradle:
  cabal:
    component: "lib:hie-bios"

Constructors

Config 

Fields

Instances
Functor Config Source # 
Instance details

Defined in HIE.Bios.Config

Methods

fmap :: (a -> b) -> Config a -> Config b #

(<$) :: a -> Config b -> Config a #

Eq a => Eq (Config a) Source # 
Instance details

Defined in HIE.Bios.Config

Methods

(==) :: Config a -> Config a -> Bool #

(/=) :: Config a -> Config a -> Bool #

Show (Config a) Source # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> Config a -> ShowS #

show :: Config a -> String #

showList :: [Config a] -> ShowS #

FromJSON a => FromJSON (Config a) Source # 
Instance details

Defined in HIE.Bios.Config

data CradleConfig a Source #

Constructors

CradleConfig 

Fields

  • cradleDependencies :: [FilePath]

    Dependencies of a cradle. Dependencies are expected to be relative to the root directory. The given files are not required to exist.

  • cradleType :: CradleType a

    Type of the cradle to use. Actions to obtain compiler flags from are dependant on this field.

Instances
Functor CradleConfig Source # 
Instance details

Defined in HIE.Bios.Config

Methods

fmap :: (a -> b) -> CradleConfig a -> CradleConfig b #

(<$) :: a -> CradleConfig b -> CradleConfig a #

Eq a => Eq (CradleConfig a) Source # 
Instance details

Defined in HIE.Bios.Config

Show (CradleConfig a) Source # 
Instance details

Defined in HIE.Bios.Config

FromJSON a => FromJSON (CradleConfig a) Source # 
Instance details

Defined in HIE.Bios.Config

data CradleType a Source #

Constructors

Cabal 
CabalMulti [(FilePath, String)] 
Stack 
StackMulti [(FilePath, String)] 
Bios 

Fields

  • prog :: FilePath

    Path to program that retrieves options to compile a file

  • depsProg :: Maybe FilePath

    Optional Path to program to obtain cradle dependencies. Each cradle dependency is to be expected to be on a separate line and relative to the root dir of the cradle, not relative to the location of this program.

Direct 

Fields

None 
Multi [(FilePath, CradleConfig a)] 
Other 
Instances
Functor CradleType Source # 
Instance details

Defined in HIE.Bios.Config

Methods

fmap :: (a -> b) -> CradleType a -> CradleType b #

(<$) :: a -> CradleType b -> CradleType a #

Eq a => Eq (CradleType a) Source # 
Instance details

Defined in HIE.Bios.Config

Methods

(==) :: CradleType a -> CradleType a -> Bool #

(/=) :: CradleType a -> CradleType a -> Bool #

Show (CradleType a) Source # 
Instance details

Defined in HIE.Bios.Config

FromJSON a => FromJSON (CradleType a) Source # 
Instance details

Defined in HIE.Bios.Config