https://github.com/hapytex/string-like
A uniform interface for String-like objects in Haskell
https://github.com/hapytex/string-like
haskell string string-manipulation
Last synced: about 1 year ago
JSON representation
A uniform interface for String-like objects in Haskell
- Host: GitHub
- URL: https://github.com/hapytex/string-like
- Owner: hapytex
- License: bsd-3-clause
- Created: 2020-04-09T10:52:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T19:42:57.000Z (about 5 years ago)
- Last Synced: 2023-09-20T08:57:18.808Z (over 2 years ago)
- Topics: haskell, string, string-manipulation
- Language: Haskell
- Homepage: https://string-like.django-antipatterns.com/
- Size: 6.45 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# string-like
[](https://github.com/hapytex/string-like/actions/workflows/build-ci.yml)
[](https://matrix.hackage.haskell.org/#/package/string-like)
[](https://hackage.haskell.org/package/string-like)
This package is based on the [**`Text.StringLike`** module](https://hackage.haskell.org/package/tagsoup/docs/Text-StringLike.html) of the [**`tagsoup`** package](https://hackage.haskell.org/package/tagsoup).
The package defines a typeclass that can be implemented to provide a uniform interface for `String`-like objects.
The typeclass itself has default implementations that convert the `StringLike`
item first to a lazy `Text`, then performs the operation, and converts results back to
its `StringLike` object. This is usually /not/ as efficient as an operation for
that specific type. Therefore it is advisable to implement the other functions as well.
One can however decide to only implement `fromText` and `toText`; or `toString`.
## Contribute
You can contribute by making a pull request on the [*GitHub
repository*](https://github.com/hapytex/string-like).
You can contact the package maintainer by sending a mail to
[`hapytexeu+gh@gmail.com`](mailto:hapytexeu+gh@gmail.com).