You might be interested in ocsigen, coupled with the Eliom web programming framework and ocamlduce.
This provides a framework to develop web application using the ocaml language, with features like:
- Continuation-based Web programming
- Static checking of XHTML (using OCaml or OCamlDuce)
- Automatic management of sessions
- Concise and modular programming
Coupled with ocamlduce, this can be very powerful. Ocamlduce is an extension to ocaml that provides type safe xml manipulation. With this, the type checker can guarantee for example that a function generates an xhtml valid page, in every situation.
It can be used with macaque, which is not as mature as the rest of ocsigen, but provies type safe database manipulation, using comprehensions.
With this, you can have static type checking of your program, and also data-level type checking, where you can have strong guaranties the date you generate is correct.
Another interesting framework is hop, where you can use scheme to code both server side, and client side, with on the fly compilation to javascript. However, scheme is a language from the lisp family, and does not provide real static type checking, but hop provides tools to ensure the data you generate is correctly formed.