pliosoft / toml-parse

Haskell library for reading TOML and easily querying it
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Support query of arrays in TomlPath's isString instance #1

Open clord opened 8 years ago

clord commented 8 years ago

I imagine this would look something like: "a[0]", and would play well with other paths, like "a.b[0].c". Of course for arbitrary arrays it would be better to construct the TomlPath explicitly, or with a lens. The purpose of this style of query is for fixed-length arrays with a meaning assigned to each slot, like:

point = [0,1,2]

So that query can be something like getX = query "point[0]"