logo
首页技术栈工具库讨论
ConfigFileTH

ConfigFileTH

This module provides syntax for concise definitions of config files from Data.ConfigFile through template haskell. For example, the following splice, $(genConf Example [$conf| elbow/center -> ec :: Double elbow/min -> emi :: Double elbow/max -> ema :: Double |]) resolves into declaration of the following datatype data Example = Example ec :: Double ,emi :: Double ,ema :: Double and a function loadExample :: (MonadIO m) => FilePath -> m (Either CPError Example) , which uses Data.ConfigFile to read a values for the above struct from a file.
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
HACKAGE
carbal install ConfigFileTH
查看
标签
根据用户添加的标签生成
暂无标签