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

xformat

This package is composed of two functions for formatted conversion between strings and typed values. Each is defined as a type-indexed function using a type class with multiple parameters and functional dependencies along with format descriptors. Text.XFormat.Read allows one to parse values from a formatted string. Its functionality is similar to the C scanf function. Unlike scanf, however, the format descriptor is well-typed, ensuring that the output type is statically known. Text.XFormat.Show allows one to print values to a formatted string. Its functionality is similar to the C printf function. Unlike printf, however, the format descriptor is well-typed, ensuring that the variable number arguments are statically known. These functions can be easily extended to support new formats and new types. Extension is simple: define a format descriptor and an instance of the appropriate class.
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
GitHub iconspl/xformat5
HACKAGE
carbal install xformat
查看
标签
根据用户添加的标签生成
暂无标签