ipfs-1.0.0: Access IPFS locally and remotely

Safe HaskellNone
LanguageHaskell2010

Network.IPFS.Config

Description

Application configuration and top-level RIO helpers

Synopsis

Documentation

get :: (MonadReader cfg m, Has a cfg) => m a Source #

Get a value from the reader config

>>> data Field = Field Text
>>> data Cfg = Cfg Field
>>> 
>>> instance Has Field Cfg where hasLens = \f (Cfg field) -> Cfg <$> f field
>>> 
>>> :{
>>> runRIO (Cfg $ Field "hello world") do
>>> Field txt <- get
>>> return txt
>>> :}
"hello world"