Closed iand675 closed 7 years ago
Unfortunately, while this is a temporary fix, it doesn't fix the underlying problem which is that there are two versions of the h$listProps function, one which returns a haskell value for which unsafeCoerce works perfectly fine in ghcjs-base's jsbits, and one which returns a javascript list located in shims which breaks the unsafeCoerce.
Since the order that ghcjs emits code is causing it to select the one from shims, your change to use fromListIO does work. But if ghcjs ever changes the order in which code is emitted, this will break again and have to go back to unsafeCoerce.
The solution is to rename one of the two versions of h$listProps. I would submit a pull, but I don't know exactly why the shims version of h$listProps even exists. Maybe the correct solution is to just delete the version of h$listProps inside shims? As far as I can see, nothing in shims itself requires h$listProps.
This should have been fixed by https://github.com/ghcjs/shims/pull/41
js_listProps
was improperly treating a JSArray as[JSString]
, which was causing crashes trying to use theFromJSVal
instance forValue
. @luite This seems like a fairly serious bug rather than just a nicety. Any chance this can get reviewed & merged ASAP?