Comments (4)
I will accept a PR that adds this (the traversal must also have haddocks on par with other microlens docs).
from microlens.
btw it is very easy to implement. But in what cases is it useful? Show and Read are simple classes for debugging.
import Text.Read (readMaybe)
_Show :: (Show a, Read a) => Traversal' String a
_Show next source =
case readMaybe source of
Just value -> show <$> next value
Nothing -> pure source
from microlens.
@kana-sama Here's a use case: https://hackage.haskell.org/package/pcre2-1.1.4/docs/Text-Regex-Pcre2.html#v:_regex
from microlens.
I didn't bump versions because of another couple functions I remembered to ask about that you might want to include in the same release, if at all (see above issue).
from microlens.
Related Issues (20)
- at for HashSet HOT 2
- [GHC 9] Port TH changes HOT 3
- type Prism HOT 2
- Add instance Ixed (NonEmpty a) HOT 3
- microlens-th-0.4.3.7 fails to build with th-abstraction-0.3.*
- Port the HashMap and Set alterF improvements
- Add worded and lined HOT 2
- Add more FieldX instances for tuples HOT 3
- `Each` instance for Set missing HOT 3
- Min version of GHC supported?
- Drop support for GHC < 7.9 and base < 4.8? HOT 3
- Support mtl 2.3 and transformers 0.6 HOT 2
- Support for mtl-2.3 HOT 3
- Permit text-2.0 HOT 4
- Add tags for releases HOT 11
- `microlens-th`: support GHC 9.6 HOT 2
- th-abstraction 0.5 not supported HOT 1
- Version on Hackage does not compile with ghc-9.6.1 HOT 4
- Change might be needed for TemplateHaskell shipped with GHC 9.8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microlens.