It's definitely supported - you can try it out on
http://roy.brianmckenna.org/
The most interesting example would be jQuery deferred:
https://raw.github.com/pufuwozu/roy/master/examples/deferredmonad.roy
The problem is that accessing names that Roy doesn't know about falls
back to dynamic typing. That makes it easy to access things like
jQuery.
If you take a look at the Roy REPL - unknown things are typed as "Native".
roy> console
{} : Native
Any "Native" type can be implicitly coerced to a different type, like so:
roy> let f: Number = console
roy> f
{} : Number
(treating console as a Number is of course broken)
So, you have to be careful when interoperating because it falls back
to dynamic typing. But it's easy to give a statically typed API to the
external stuff and use that instead.
My advice is to separate pure Roy code from native JavaScript calls as
much as possible. Hopefully that will mostly be possible when I
implement a good standard library.
Also, another problem with this approach is that you can make typos
and Roy doesn't tell you that it has fallen back to dynamic typing.
I'm going to make it so that a warning is shown when you access
something that Roy doesn't know about. People wanting to enforce more
"correctness" can treat that warning as an error for their pure Roy
modules.
Hopefully that makes some sense. Please let me know what you think
about the approach.
Thanks,
Brian