WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2024 Poal.co

1.0K

I've been thinking about how to fit idris and javascript as seamless as possible.

The FFI code in the idris compiler is a little lacking in that although it supports calling javascript from idris pretty well, vice versa is a little iffy. I mean I can call idris from js but it's pretty bare bones. Any call that is made lacks any type checking, which means I'd either have to write it by hand or find some way to automate it.

I have been looking at the source code for the idris compiler to see how easy it would be to create what amounts basically to a "header file" in typescript, so that at least the types would have to match when calling into idris.

It's quite complicated and I probably shouldn't be messing with the compiler, but it seems that it may be in reach. If so, I could also give the patch to the idris community to see if they want to add it to idris.

Besides that I looked at how to use reflection to automatically marshall idris record types into js objects.

I've been thinking about how to fit idris and javascript as seamless as possible. The FFI code in the idris compiler is a little lacking in that although it supports calling javascript from idris pretty well, vice versa is a little iffy. I mean I can call idris from js but it's pretty bare bones. Any call that is made lacks any type checking, which means I'd either have to write it by hand or find some way to automate it. I have been looking at the source code for the idris compiler to see how easy it would be to create what amounts basically to a "header file" in typescript, so that at least the types would have to match when calling into idris. It's quite complicated and I probably shouldn't be messing with the compiler, but it seems that it may be in reach. If so, I could also give the patch to the idris community to see if they want to add it to idris. Besides that I looked at how to use reflection to automatically marshall idris record types into js objects.

(post is archived)