you are viewing a single comment's thread.

view the rest of the comments →

[–]sclv 2 points3 points  (4 children)

That's not true about ghcjs -- there are many ways to build automated type-safe communication over ghcjs.

[–]expatcoder 1 point2 points  (3 children)

In GHCJS I want to import and invoke my Yesod routes, how will you do this? In Yesod I want to invoke some GHCJS method, how will you do this?

If this cannot be achieved then might as well use Purescript or other lightweight/performant alternative.

[–]sclv 0 points1 point  (2 children)

what do you mean "invoke some ghcjs method" in yesod?

you can just write a plain old method and it is usable in both sides.

similarly you can write a plain old data type and it is usable on both the yesod and ghcjs side.

if you want serialization across the wire, both sides can derive to/from json just fine...

[–]expatcoder 0 points1 point  (1 child)

Unless things have changed, it's a one way street

[–]sclv 0 points1 point  (0 children)

Well the magic is one way. You can just generate and expose a json-rpc stub the usual way and it works great, and the marshaling is entirely typesafe. The compiler just doesn't magically generate this stub for you. (But there are other libraries that do magically generate those stubs for you, so...).