hie-bios-0.12.0: Set up a GHC API session
Safe HaskellSafe-Inferred
LanguageHaskell2010

HIE.Bios.Config

Description

Logic and datatypes for parsing hie.yaml files.

Synopsis

Documentation

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

newtype Config a #

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

Instances details
Functor Config # 
Instance details

Defined in HIE.Bios.Config

Methods

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

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

Show (Config a) # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> Config a -> ShowS

show :: Config a -> String

showList :: [Config a] -> ShowS

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

Defined in HIE.Bios.Config

Methods

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

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

data CradleConfig a #

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

Instances details
Functor CradleConfig # 
Instance details

Defined in HIE.Bios.Config

Methods

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

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

Show (CradleConfig a) # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> CradleConfig a -> ShowS

show :: CradleConfig a -> String

showList :: [CradleConfig a] -> ShowS

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

Defined in HIE.Bios.Config

Methods

(==) :: CradleConfig a -> CradleConfig a -> Bool

(/=) :: CradleConfig a -> CradleConfig a -> Bool

data CabalType #

Instances

Instances details
Monoid CabalType # 
Instance details

Defined in HIE.Bios.Config

Semigroup CabalType # 
Instance details

Defined in HIE.Bios.Config

Methods

(<>) :: CabalType -> CabalType -> CabalType #

sconcat :: NonEmpty CabalType -> CabalType

stimes :: Integral b => b -> CabalType -> CabalType

Show CabalType # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> CabalType -> ShowS

show :: CabalType -> String

showList :: [CabalType] -> ShowS

Eq CabalType # 
Instance details

Defined in HIE.Bios.Config

Methods

(==) :: CabalType -> CabalType -> Bool

(/=) :: CabalType -> CabalType -> Bool

pattern CabalType :: Maybe String -> CabalType #

cabalComponent :: CabalType -> Maybe String #

data StackType #

Instances

Instances details
Monoid StackType # 
Instance details

Defined in HIE.Bios.Config

Semigroup StackType # 
Instance details

Defined in HIE.Bios.Config

Methods

(<>) :: StackType -> StackType -> StackType #

sconcat :: NonEmpty StackType -> StackType

stimes :: Integral b => b -> StackType -> StackType

Show StackType # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> StackType -> ShowS

show :: StackType -> String

showList :: [StackType] -> ShowS

Eq StackType # 
Instance details

Defined in HIE.Bios.Config

Methods

(==) :: StackType -> StackType -> Bool

(/=) :: StackType -> StackType -> Bool

pattern StackType :: Maybe String -> Maybe String -> StackType #

stackComponent :: StackType -> Maybe String #

stackYaml :: StackType -> Maybe String #

data CradleType a #

Constructors

Cabal 

Fields

CabalMulti 

Fields

Stack 

Fields

StackMulti 

Fields

Bios 

Fields

  • call :: Callable

    Path to program or shell command that retrieves options to compile a file

  • depsCall :: Maybe Callable

    Optional path to program or shell command 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.

  • ghcPath :: Maybe FilePath

    Optional path to the ghc binary

Direct 

Fields

None 
Multi [(FilePath, CradleConfig a)] 
Other 

Instances

Instances details
Functor CradleType # 
Instance details

Defined in HIE.Bios.Config

Methods

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

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

Show (CradleType a) # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> CradleType a -> ShowS

show :: CradleType a -> String

showList :: [CradleType a] -> ShowS

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

Defined in HIE.Bios.Config

Methods

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

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

data Callable #

Constructors

Program FilePath 
Command String 

Instances

Instances details
Show Callable # 
Instance details

Defined in HIE.Bios.Config

Methods

showsPrec :: Int -> Callable -> ShowS

show :: Callable -> String

showList :: [Callable] -> ShowS

Eq Callable # 
Instance details

Defined in HIE.Bios.Config

Methods

(==) :: Callable -> Callable -> Bool

(/=) :: Callable -> Callable -> Bool