string-like: A package that aims to provide a uniform interface to string-like types.

[ bsd3, library, utils ] [ Propose Tags ] [ Report a vulnerability ]

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.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), bytestring (>=0.10), text (>=1.2.3.0) [details]
License BSD-3-Clause
Copyright 2020 Willem Van Onsem
Author Willem Van Onsem
Maintainer hapytexeu+gh@gmail.com
Category utils
Home page https://github.com/hapytex/string-like#readme
Source repo head: git clone https://github.com/hapytex/string-like
Uploaded by wvanonsem90 at 2021-05-11T19:47:07Z
Distributions NixOS:0.1.0.1
Downloads 444 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-05-11 [all 1 reports]

Readme for string-like-0.1.0.1

[back to package description]

string-like

Build Status of the package by GitHub actions Build Status of the package by Hackage Hackage version badge

This package is based on the Text.StringLike module of the tagsoup package.

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.

You can contact the package maintainer by sending a mail to hapytexeu+gh@gmail.com.