Closed turboMaCk closed 2 years ago
You could add a reference to your recommended library in the readme, perhaps (?)
@googleson78 definitely. Documentation is something I did not look into yet at all but we definitely should review it before considering this or any other implementation complete.
I'll hold merge of this just for a bit because I also have one other suggestion which is related to this I would like to know your opinion about before merging this PR
ok lets go with this first. Other changes will require some discussions as well.
This is proof of concept implementation for the https://github.com/Holmusk/elm-street/issues/102.
NonEmpty
is represented as(a, List a)
- this means we don't depend on any type that is not part ofelm/core
but we don't loose any guarantees either.[1, 2]
. Because of this NonEmpty can't be defined in terms ofElmPair
in AST.Usage on Elm Side.
One can easily convert pair to any custom implementation of
NonEmpty
:In most case it should be simpler to use already compatible implementation -- That will especially simplify cases where
NonEmpty
is nested within other data.