Ela, dynamic functional language
elalang.net
elalang.net
(EDIT: Oops, I meant its "distinctive features" page http://elalang.net/About.aspx#features , under "Algebraic Types".)
(It's just my assumption that it doesn't handle empty lists, because it returns the literal first element of a non-empty one; but neither the Prelude http://elalang.net/docs/Article.aspx?p=lib\prelude.htm nor the list module http://elalang.net/docs/Article.aspx?p=lib\list.htm seems explicitly to mention the `head` function on lists (as opposed to strings or sequences) at all, so it's hard to say for sure.)
x = head xs //x is Some 1
which suggests 'head' is of type 'a -> Option a' and does not have the wart you are talking about. xs :: [Maybe Int]
head xs :: Maybe IntEla is clearly inspired by Haskell. It copies syntax and surface-level features mercilessly. It's also devoted to being dynamically typed which dramatically undermines the meaning and development of those very features.
It makes for an interesting experiment. I can't say whether or not a dynamic language of this design is easy to work in compared with others.
But I read things like Ela's "algebraic data types" and shudder a bit (and then a lot when I find the "Circle (& 'hello')" example). They're definitely inspired by ADTs, but also definitely nothing similar. These ADTs are that alien from MIB who steals human skin---on the surface you might confuse them, but a different sort of life boils underneath.
By nature, a language which is type safe and strictly typed must be burdened by the limitations of a "particular type checker." This is weak type safety at best. And it looks like there are runtime class checks, so you have all of the traditional drawbacks of dynamic languages.
The author may want to tone down that claim - combining Haskell-style FP with dynamic typing certainly entails some trade-offs, regardless of whether or not they think it's a good idea.
Edit: It was by chance that it happened to be the example in the "A taste of Ela" box at the top. Reloading the page makes the example change to something else, so if you are wondering what I'm talking about, reload the page until the "taste" box explicitly calls something the Sieve of Eratosthenes. It isn't.
//Sieve of Eratosthenes
primes xs = sieve xs
where sieve [] = []
sieve (p::xs) =
& p :: sieve [& x \\ x <- xs | x % p > 0]
//Outputs: [2,3,5,7]
primes [2..10]