stan icon indicating copy to clipboard operation
stan copied to clipboard

Partial functions from boot libraries

Open vrom911 opened this issue 5 years ago • 1 comments

containers

  • [ ] Data.Map.(!)
  • [ ] Data.IntMap.(!)

text

All functions as for lists, and much more. Also, for both Text types: strict Text and lazy Text.

bytestring

All functions as for lists, and much more. Also, for both ByteString types: strict ByteString and lazy ByteString.

vrom911 avatar May 01 '20 13:05 vrom911

We can easily provide inspections for functions from the containers library, since there are not so many partial functions. But the number of partial functions in the API for text and bytestring is huge...

I had a thought about this issue: once #124 is implemented, inspections for those libraries (as well as any other library) can be simply defined as external TOML files with custom inspections. I imagine, we (or community, probably even text maintainers) can create a file like .stan-text.toml with custom inspections for text like:

[[inspection]]
type = "FindName"
id   = "TEXT-0001"
name = "Usage of partial function: Data.Text.head"
...

[[inspection]]
type = "FindName"
id   = "TEXT-0002"
name = "Usage of partial function: Data.Text.tail"
...

And during Stan work, users can simply specify paths/urls to those files and get all those inspections for their projects.

chshersh avatar Jun 06 '20 17:06 chshersh