Copyright | (c) 2019 Lucas David Traverso |
---|---|
License | MPL-2.0 |
Maintainer | Lucas David Traverso <lucas6246@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Source that namespaces an inner source
Synopsis
- data NamespacedSource = NamespacedSource {
- scopeKey :: Key
- innerSource :: Source
- fromConfig :: Key -> SourceCreator -> SourceCreator
- fromInner :: Key -> Source -> Source
Documentation
data NamespacedSource Source #
This source takes a source and returns a new source that
always checks that the Key
given always starts with certain Key
and then strips that prefix before consulting its inner Source
Instances
Show NamespacedSource Source # | |
Defined in Conferer.Source.Namespaced showsPrec :: Int -> NamespacedSource -> ShowS # show :: NamespacedSource -> String # showList :: [NamespacedSource] -> ShowS # | |
IsSource NamespacedSource Source # | |
Defined in Conferer.Source.Namespaced getKeyInSource :: NamespacedSource -> Key -> IO (Maybe Text) Source # getSubkeysInSource :: NamespacedSource -> Key -> IO [Key] Source # |
fromConfig :: Key -> SourceCreator -> SourceCreator Source #
Create a SourceCreator
from a prefix and another SourceCreator