https://github.com/krisajenkins/purescript-formatting
A type-safe, composable, printf-alternative for PureScript.
https://github.com/krisajenkins/purescript-formatting
purescript
Last synced: 11 months ago
JSON representation
A type-safe, composable, printf-alternative for PureScript.
- Host: GitHub
- URL: https://github.com/krisajenkins/purescript-formatting
- Owner: krisajenkins
- License: mit
- Created: 2017-04-04T09:00:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T11:32:32.000Z (over 3 years ago)
- Last Synced: 2025-07-12T01:46:02.468Z (11 months ago)
- Topics: purescript
- Language: PureScript
- Homepage:
- Size: 351 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Formatting
[](https://travis-ci.org/krisajenkins/purescript-formatting)
A type-safe string formatting library, based on [Chris Done's Haskell version](https://hackage.haskell.org/package/formatting).
It fulfils the need for string-interpolation or a `printf` function,
without sacrificing type safety or requiring any special
language-level support.
It also composes well, making it easy to build up complex, reusable formatters.
## Documentation
Module documentation is published on Pursuit: [http://pursuit.purescript.org/packages/purescript-formatting](http://pursuit.purescript.org/packages/purescript-formatting)
## Credits
This package is a port of [Chris Done's Formatting][formatting] library for
Haskell.
[formatting]: http://chrisdone.com/posts/formatting
## Contributing
More specialised formatters (like "print to a certain number of
decimal places") would be welcome.
For more advanced help, I have a suspicion that `before` and `after`
have a proper home in some category somewhere, and I'd like to find
out where it is. Also, I suspect we can relax the composition
restraint from `Format String` to `forall m. Semigroupoid m => Format m`.
If you know how, I'd love your input.
## See Also
A port of this library is also [available for Elm](http://package.elm-lang.org/packages/krisajenkins/formatting/latest).
## License
Copyright © 2017 Kris Jenkins
Distributed under the MIT license.