module Juno.Types.Config
( Config(..)
, HasConfig(..) -- we don't have to list all the fields here
, KeySet(..), ksClient, ksCluster
) where
-- makeLense ''Config
makeClassy ''Config
in Simple.hs
instance HasConfig (RaftEnv m) where
config = cfg
then we can access config field like this:
nid <- view (cfg.nodeId) -- it's ok
nid <- view nodeId -- it's ok too
Hi: how about use makeClassy for Config type?
in Config.hs
in Simple.hs
then we can access config field like this: