salak-0.2.10: Configuration Loader

Copyright(c) 2019 Daniel YU
LicenseBSD3
Maintainerleptonyu@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Salak.Load

Contents

Description

This module is designed for implementating configuration file loading. Please don't use if you are not implemanting a new configuration file.

Synopsis

SourcePack

type Source = SourceT QV Source #

data SourcePack Source #

Source package, used to store all properties.

Instances
Show SourcePack Source # 
Instance details

Defined in Salak.Types

MonadReader SourcePack Prop Source # 
Instance details

Defined in Salak.Prop

Methods

ask :: Prop SourcePack #

local :: (SourcePack -> SourcePack) -> Prop a -> Prop a #

reader :: (SourcePack -> a) -> Prop a #

Selector

data Selector Source #

Constructors

SStr !Text 
SNum !Int 
Instances
Eq Selector Source # 
Instance details

Defined in Salak.Types.Selector

Ord Selector Source # 
Instance details

Defined in Salak.Types.Selector

Show Selector Source # 
Instance details

Defined in Salak.Types.Selector

Source

Load

load Source #

Arguments

:: MonadIO m 
=> String

Loading name

-> (Priority -> Source -> WriterT [String] IO Source)

Convert properties

-> LoadSalakT m () 

loadOnce Source #

Arguments

:: (Foldable f, Monad m) 
=> String

Loading name

-> f a

Properties

-> (Priority -> a -> m (Text, Value))

Convert properties to Value

-> LoadSalakT m () 

Load properties only once