Roy info log message

35 views
Skip to first unread message

scitesy

unread,
Jun 16, 2012, 1:19:48 AM6/16/12
to roy...@googlegroups.com
I'm wondering if it is necessary to output this message during compilation: Roy info: Identifier "$" on line 11 is unknown - dynamically typed  Chances are a developer is including the dynamically typed code to do interop with other javascript libraries and don't really need this log information.

While using the Yesod/Shakespeare/Roy module, the error message gets included in the JavaScript on the page.  Although I'm not a fan of monkey patching, I can monkey patch Roy by commenting out lines 666 through 670 of the typeinference.js source file.  This works fine however I'm wondering if there could be a flag to suppress the message at the Roy commandline or if this is something that would need to be addressed in Shakespeare.

Thanks,

Scott

Brian McKenna

unread,
Jun 26, 2012, 7:44:29 AM6/26/12
to roy...@googlegroups.com
Hi Scott,

I really thought that "console.info" would output to stderr instead of
stdout. Whoops.

I just pushed a change to remove the warning. I found it more annoying
than useful at the moment.

My plan is to eventually add flags/pragmas to:

a) Ignore these warnings (useful if you're writing a module calling a lot of JS)
b) Treat these warnings as errors (useful if you're writing pure Roy code)

But that's pretty low priority compared to getting Roy's type-system
to make sense :)

How are you finding the Yesod integration?

scitesy

unread,
Jun 26, 2012, 8:18:50 AM6/26/12
to roy...@googlegroups.com


On Tuesday, June 26, 2012 7:44:29 AM UTC-4, Brian McKenna wrote:
Hi Scott,

I really thought that "console.info" would output to stderr instead of
stdout. Whoops.

I just pushed a change to remove the warning. I found it more annoying
than useful at the moment. 
 
Thanks! 


My plan is to eventually add flags/pragmas to:

a) Ignore these warnings (useful if you're writing a module calling a lot of JS)
b) Treat these warnings as errors (useful if you're writing pure Roy code)

But that's pretty low priority compared to getting Roy's type-system
to make sense :)

Agreed! 

How are you finding the Yesod integration?

So far I've toyed around with outputting the compiled Roy to JS into hamlet generated html.  I can really see the potential of either writing pure Roy modules and/or using Roy to interface with other JavaScript libraries.  The Yesod integration seems flexible enough.  Once I get further down the rabbit hole I'll be better positioned to answer your question.  I'll keep you posted.  Thanks for Roy!

Scott
Reply all
Reply to author
Forward
0 new messages