Afaict Perl 6 covers this case:
http://jnthn.net/papers/2015-fosdem-static-dynamic.pdf#page=...
Or am I missing something?
http://www.yesodweb.com/page/about
I suspect this is accomplished through safe vs. unsafe types. Imagine the only function from `unsafe___` to `safe___` is the escape function, and all functions giving text back in responses is require to be of type `safe___`.
Clearly you won't be able to prevent (nor would you want to) links like yours above from being a 404, so perhaps no more internal 404s would be more accurate.
That's the advantage of compiled languages over dynamic ones in these kinds of scenarios: you sacrifice immediate feedback during development to gain a guarantee from the compiler that all invariants you embedded in the application uphold. And the more powerful the language/compiler combination, the more compile-time guarantees you can specify.
The linked website is beautifully done, and the language does look interesting, I just find the hyperbole about static types making websites magically secure a little over-egged - it's still easy to mess up security or create subtle bugs even if you have strong guarantees about some parts of your code at compile time provided by types.
If you're used to only programming in dynamic languages, it can be a shock, but yes, a good type system can do things you never thought possible.
If you were the downvoter, I'll take my vote back now.