You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{- | Array of values. According to TOML specification all values in array
should have the same type. This is guaranteed statically with this type.
@
arr1 = [ 1, 2, 3 ]
arr2 = [ "red", "yellow", "green" ]
arr3 = [ [ 1, 2 ], [3, 4, 5] ]
arr4 = [ "all", \'strings\', """are the same""", \'\'\'type\'\'\']
arr5 = [ [ 1, 2 ], ["a", "b", "c"] ]
arr6 = [ 1, 2.0 ] # INVALID
@
-}
Array:: [Valuet] ->Value 'TArray
This seems to be in line with all the previous versions of the TOML specification, however it was recently changed in toml-lang/toml#676
Updating tomland to the latest version of the spec is probably quite involved, and would likely change the user facing API. The Value type being a GADT is most likely only to ensure that this invariant around arrays is held.
I am opening this issue to simply ask if there are any plans to support this new feature? And if so, if you need any help implementing it! 😄
The text was updated successfully, but these errors were encountered:
Hey @basile-henry , thanks for the report!
We are supporting the current version of the TOML specs — TOML-0.5.0. What you are talking about are unreleased changes in the master branch. It is still not confirmed that it is going to be in the next release and the date of the major upgrade could be too far away to spoil the library with unsupported changes.
Thanks for letting us know, but again I wouldn't be in a hurry to support such huge and not thought-through changes. Let's decide the future of the tomland when the time comes.
Currently
tomland
disallows mixed type in TOML arrays.From the documentation for the
Value
constructorArray
:tomland/src/Toml/Type/Value.hs
Lines 172 to 185 in d9b7a1d
This seems to be in line with all the previous versions of the TOML specification, however it was recently changed in toml-lang/toml#676
Updating
tomland
to the latest version of the spec is probably quite involved, and would likely change the user facing API. TheValue
type being a GADT is most likely only to ensure that this invariant around arrays is held.I am opening this issue to simply ask if there are any plans to support this new feature? And if so, if you need any help implementing it! 😄
The text was updated successfully, but these errors were encountered: