Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ComponentConfig = ComponentConfig {
- name :: Text
- properties :: Value
- data AppConfig = AppConfig {
- app :: [ComponentConfig]
- loadAppConfig :: (HasLightEnv env, MonadIO m) => FilePath -> (Text -> Value -> LightT env m Component) -> LightT env m [Component]
- data Expr
- parser :: Parser Expr
- data Context = Context {}
- getAt :: Value -> [Either Int Text] -> Value
- normalize :: Vector (Either Int Text) -> [Either Int Text] -> [Either Int Text]
- pattern Arithmetic :: Text -> Scientific -> Scientific -> Expr
- eval :: Context -> Expr -> Value
- convertPath :: Text -> [Either Int Text]
- convert :: Context -> Text -> Value
- parseText :: Parser a -> Text -> Result a
- resolve :: Value -> Value
Documentation
data ComponentConfig Source #
ComponentConfig | |
|
Instances
Generic ComponentConfig Source # | |
Defined in MiniLight.Component.Loader type Rep ComponentConfig :: Type -> Type # from :: ComponentConfig -> Rep ComponentConfig x # to :: Rep ComponentConfig x -> ComponentConfig # | |
FromJSON ComponentConfig Source # | |
Defined in MiniLight.Component.Loader parseJSON :: Value -> Parser ComponentConfig parseJSONList :: Value -> Parser [ComponentConfig] | |
type Rep ComponentConfig Source # | |
Defined in MiniLight.Component.Loader type Rep ComponentConfig = D1 (MetaData "ComponentConfig" "MiniLight.Component.Loader" "minilight-0.1.0-inplace" False) (C1 (MetaCons "ComponentConfig" PrefixI True) (S1 (MetaSel (Just "name") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "properties") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Value))) |
AppConfig | |
|
Instances
Generic AppConfig Source # | |
FromJSON AppConfig Source # | |
Defined in MiniLight.Component.Loader parseJSON :: Value -> Parser AppConfig parseJSONList :: Value -> Parser [AppConfig] | |
type Rep AppConfig Source # | |
Defined in MiniLight.Component.Loader type Rep AppConfig = D1 (MetaData "AppConfig" "MiniLight.Component.Loader" "minilight-0.1.0-inplace" False) (C1 (MetaCons "AppConfig" PrefixI True) (S1 (MetaSel (Just "app") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 [ComponentConfig]))) |
:: (HasLightEnv env, MonadIO m) | |
=> FilePath | Filepath to the yaml file. |
-> (Text -> Value -> LightT env m Component) | Specify any resolver. |
-> LightT env m [Component] |
Load an config file and construct components.
pattern Arithmetic :: Text -> Scientific -> Scientific -> Expr Source #