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
Following official documentation, to call show upon a data value inside JS I just need to do that, it should Just Work™.
But for some reason show returns undefined. More over, if I do spago bundle-app and look at the resulting index.js, I don't even see the string for the Show instance to produce, so if there's some odd trick required, it's impossible to derive from the output.
moduleMainwhereimportPreludeimportEffect (Effect)
dataFoo=FooinstancefooShow::ShowFoowhereshowFoo="Foo"--| re-export of `show`show_::∀a.Showa=>a->String
show_ =showforeignimport printFoo ::Foo->EffectUnitmain::EffectUnit
main = printFoo Foo-- same as `log $ show Foo`
Description
Following official documentation, to call
showupon adatavalue inside JS I just need to do that, it should Just Work™.But for some reason
showreturnsundefined. More over, if I dospago bundle-appand look at the resultingindex.js, I don't even see the string for the Show instance to produce, so if there's some odd trick required, it's impossible to derive from the output.This came up as part of forum discussion.
To Reproduce
Create
src/Main.pursas:and
src/Main.jsas:Execute
spago runExpected behavior
It should output
Foo, notundefinedPureScript version
0.15.15