[Ur] [Ur/Web Ffi: JavaScript]

Adam Chlipala adamc at csail.mit.edu
Tue Apr 25 08:10:10 EDT 2017


On 04/24/2017 11:54 PM, Jeevjyot Chhabda wrote:
> I am developing an application in Ur/Web which requires good amount of javascript code. I would like to warn/ throw an error during the compile time when the user doesn’t set the right configuration in javascript? Is it possible to throw compile time error through javascript code?
> I would like to take the benefit of the compilation of the web app.

Short answer: no, it is not possible to do any kind of compile-time 
analysis of JavaScript code.  That is, Ur/Web provides no tools for 
static analysis of JavaScript.

I also encourage you to reconsider using "a good amount of JavaScript 
code" in any Ur/Web application, especially when you're writing that 
code instead of importing a popular library.  It usually isn't the best 
way to accomplish the overall goal of a project.



More information about the Ur mailing list