3 ms·
In general, you must run TH on the target platform for it to be correct. Otherwise, you may generate code that only works on your host (it isn't impossible for
by whateveracct 4y ago
In general, you must run TH on the target platform for it to be correct. Otherwise, you may generate code that only works on your host (it isn't impossible for TH output to be platform-specific especially since it can do IO)
- marcosdumay 4y agoWell, now the standard can change so it always runs as WASM, and completely fix the issue.
- whateveracct 4y agoBut sometimes it might want to run on the host still (e.g. there are tools out there that generate C bindings that use platform-specific things like sizes and alignments) If we had pure TH, then at least that could run in wasm. That would be nice. But idk - I cross-compile Haskell heavily in my free time and I don't mind the external interpreter stuff.
- marcosdumay 4y ago> If we had pure TH, then at least that could run in wasm. That would be nice. IMO, ideally, pure TH wold be completely platform independent. But running in a standardized VM is a close second place. Anyway, I never realized those bidings were created with TH.
- whateveracct 4y ago`inline-c` is the main example I can think of