aantron / promise

Light and type-safe binding to JS promises
MIT License
341 stars 24 forks source link

BuckleScript 8.0.0 breaks listToArray / Promise.all #56

Closed cknitt closed 4 years ago

cknitt commented 4 years ago

The internal representation of lists changed in BuckleScript 8.0.0. Lists are now encoded as {hd, tl}, not as nested arrays anymore.

This breaks the functions listToArray and arrayToList and thereby all functions relying on them (Promise.all, Promise.race).

bobzhang commented 4 years ago

The listToArray and arrayToList seems to be interesting that we can absorb it in upstream

jfrolich commented 4 years ago

Why are these functions in this library? Isn't it better to use Belt.List.toArray and Belt.List.fromArray?

aantron commented 4 years ago

Yes, I will switch the library to the Belt functions and do a release. I don't immediately recall why I added these implementations.

aantron commented 4 years ago

The fixed version is now in npm as reason-promise@1.1.0. Thanks @cknitt for the report!

cknitt commented 4 years ago

Thanks a lot @aantron! 🎉