Fork me on GitHub

The Ur Programming Language Family

Ur is a programming language in the tradition of ML and Haskell, but featuring a significantly richer type system. Ur is functional, pure, statically typed, and strict. Ur supports a powerful kind of metaprogramming based on row types.

Ur/Web is Ur plus a special standard library and associated rules for parsing and optimization. Ur/Web supports construction of dynamic web applications backed by SQL databases. The signature of the standard library is such that well-typed Ur/Web programs "don't go wrong" in a very broad sense. Not only do they not crash during particular page generations, but they also may not:

This type safety is just the foundation of the Ur/Web methodology. It is also possible to use metaprogramming to build significant application pieces by analysis of type structure. For instance, the demo includes an ML-style functor for building an admin interface for an arbitrary SQL table. The type system guarantees that the admin interface sub-application that comes out will always be free of the above-listed bugs, no matter which well-typed table description is given as input.

The Ur/Web compiler also produces very efficient object code that does not use garbage collection. These compiled programs will often be even more efficient than what most programmers would bother to write in C. For example, the standalone web server generated for the demo uses less RAM than the bash shell. The compiler also generates JavaScript versions of client-side code, with no need to write those parts of applications in a different language.

The implementation of all this is open source.

Source Distribution

20170105 release

This is a stable release, used by several production applications. If some missing feature is important to you, please add it to the issue tracker.

In Popular Package and Container Systems

In all of the below, the main package is called urweb.

  • Arch Linux: in User Repository
  • Debian: in testing/stretch (should be part of next stable release!)
  • Docker: unofficial GitHub repo
  • Homebrew (Mac OS X): in official repository
  • Nix: binary and build rule
  • OpenBSD: currently available as an experimental repository
  • Ubuntu: in latest LTS release
  • Author: Adam Chlipala