Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
HIE.Bios.Types
Synopsis
- data BIOSVerbosity
- data Cradle a = Cradle {
- cradleRootDir :: FilePath
- cradleOptsProg :: CradleAction a
- data ActionName a
- data Log
- = LogAny String
- | LogProcessOutput String
- data CradleAction a = CradleAction {
- actionName :: ActionName a
- runCradle :: LogAction IO (WithSeverity Log) -> FilePath -> IO (CradleLoadResult ComponentOptions)
- runGhcCmd :: LogAction IO (WithSeverity Log) -> [String] -> IO (CradleLoadResult String)
- data CradleLoadResult r
- cradleLoadResult :: c -> (CradleError -> c) -> (r -> c) -> CradleLoadResult r -> c
- newtype CradleLoadResultT m a = CradleLoadResultT {
- runCradleResultT :: m (CradleLoadResult a)
- modCradleError :: Monad m => CradleLoadResultT m a -> (CradleError -> m CradleError) -> CradleLoadResultT m a
- throwCE :: Monad m => CradleError -> CradleLoadResultT m a
- data CradleError = CradleError {
- cradleErrorDependencies :: [FilePath]
- cradleErrorExitCode :: ExitCode
- cradleErrorStderr :: [String]
- data ComponentOptions = ComponentOptions {
- componentOptions :: [String]
- componentRoot :: FilePath
- componentDependencies :: [FilePath]
Documentation
data BIOSVerbosity #
The environment of a single Cradle
.
A Cradle
is a unit for the respective build-system.
It contains the root directory of the Cradle
, the name of
the Cradle
(for debugging purposes), and knows how to set up
a GHC session that is able to compile files that are part of this Cradle
.
A Cradle
may be a single unit in the "cabal-install" context, or
the whole package, comparable to how "stack" works.
Constructors
Cradle | |
Fields
|
data ActionName a #
Instances
Functor ActionName # | |
Defined in HIE.Bios.Types Methods fmap :: (a -> b) -> ActionName a -> ActionName b # (<$) :: a -> ActionName b -> ActionName a # | |
Show a => Show (ActionName a) # | |
Defined in HIE.Bios.Types Methods showsPrec :: Int -> ActionName a -> ShowS show :: ActionName a -> String showList :: [ActionName a] -> ShowS | |
Eq a => Eq (ActionName a) # | |
Defined in HIE.Bios.Types | |
Ord a => Ord (ActionName a) # | |
Defined in HIE.Bios.Types Methods compare :: ActionName a -> ActionName a -> Ordering (<) :: ActionName a -> ActionName a -> Bool (<=) :: ActionName a -> ActionName a -> Bool (>) :: ActionName a -> ActionName a -> Bool (>=) :: ActionName a -> ActionName a -> Bool max :: ActionName a -> ActionName a -> ActionName a min :: ActionName a -> ActionName a -> ActionName a |
Constructors
LogAny String | |
LogProcessOutput String |
data CradleAction a #
Constructors
CradleAction | |
Fields
|
Instances
Functor CradleAction # | |
Defined in HIE.Bios.Types Methods fmap :: (a -> b) -> CradleAction a -> CradleAction b # (<$) :: a -> CradleAction b -> CradleAction a # | |
Show a => Show (CradleAction a) # | |
Defined in HIE.Bios.Types Methods showsPrec :: Int -> CradleAction a -> ShowS show :: CradleAction a -> String showList :: [CradleAction a] -> ShowS |
data CradleLoadResult r #
Result of an attempt to set up a GHC session for a Cradle
.
This is the go-to error handling mechanism. When possible, this
should be preferred over throwing exceptions.
Constructors
CradleSuccess r | The cradle succeeded and returned these options. |
CradleFail CradleError | We tried to load the cradle and it failed. |
CradleNone | No attempt was made to load the cradle. |
Instances
cradleLoadResult :: c -> (CradleError -> c) -> (r -> c) -> CradleLoadResult r -> c #
newtype CradleLoadResultT m a #
Constructors
CradleLoadResultT | |
Fields
|
Instances
modCradleError :: Monad m => CradleLoadResultT m a -> (CradleError -> m CradleError) -> CradleLoadResultT m a #
throwCE :: Monad m => CradleError -> CradleLoadResultT m a #
data CradleError #
Constructors
CradleError | |
Fields
|
Instances
Exception CradleError # | |
Defined in HIE.Bios.Types Methods toException :: CradleError -> SomeException fromException :: SomeException -> Maybe CradleError displayException :: CradleError -> String | |
Show CradleError # | |
Defined in HIE.Bios.Types Methods showsPrec :: Int -> CradleError -> ShowS show :: CradleError -> String showList :: [CradleError] -> ShowS | |
Eq CradleError # | |
Defined in HIE.Bios.Types |
data ComponentOptions #
Option information for GHC
Constructors
ComponentOptions | |
Fields
|
Instances
Show ComponentOptions # | |
Defined in HIE.Bios.Types Methods showsPrec :: Int -> ComponentOptions -> ShowS show :: ComponentOptions -> String showList :: [ComponentOptions] -> ShowS | |
Eq ComponentOptions # | |
Defined in HIE.Bios.Types Methods (==) :: ComponentOptions -> ComponentOptions -> Bool (/=) :: ComponentOptions -> ComponentOptions -> Bool | |
Ord ComponentOptions # | |
Defined in HIE.Bios.Types Methods compare :: ComponentOptions -> ComponentOptions -> Ordering (<) :: ComponentOptions -> ComponentOptions -> Bool (<=) :: ComponentOptions -> ComponentOptions -> Bool (>) :: ComponentOptions -> ComponentOptions -> Bool (>=) :: ComponentOptions -> ComponentOptions -> Bool max :: ComponentOptions -> ComponentOptions -> ComponentOptions min :: ComponentOptions -> ComponentOptions -> ComponentOptions |