Closed rgrempel closed 6 years ago
I don't think calling the Elm names for the functions from Javascript is actually a big deal, on second thought, since you wouldn't typically do that for an Elm program itself -- you'd go through ports. So, as long as I implement that, I'll have everything an Elm programmer expects.
I had been using re-exports in cases where the Elm function corresponded exactly to some Purescript function. However, it seems that re-exports don't appear in the generated code (for the purposes of calling things from Javascript) -- see:
https://github.com/purescript/purescript/issues/1888
So, it might be better to actually define the functions, as being equal to the Purescript equivalents. I think I can do this in a way that doesn't actually generate an extra function call at run-time, since I can equate the bare names without parameters in these cases.
The other advantage is that I'd be able to supply the familiar Elm documentation. The disadvantage is that I'd lose the link to the Purescript equivalent in the docs, but I suppose I could add it manually.