gleam-lang / stdlib

🎁 Gleam's standard library
https://hexdocs.pm/gleam_stdlib/
Apache License 2.0
409 stars 151 forks source link

Return index of undecodable element in dynamic.list DecodeError path #627

Open johtso opened 3 weeks ago

johtso commented 3 weeks ago

https://github.com/gleam-lang/stdlib/blob/d8f046a674197b41e409fec0522a5f6d2d4c7a6d/src/gleam/dynamic.gleam#L320-L329

I think it would be nice to return the index of the offending element instead of just "*"

I'm new to gleam, but I had a little play around trying to implement this and could open a pull request..

lpil commented 3 weeks ago

Fab idea! Thank you