C++'s template expander is modelled on ML's pattern matching. Cayenne and
Qi are both perhaps two generations beyond that (both type systems being
more powerful than Haskell's) in different directions: personally I prefer
Qi's, but part of that is probably because it's possible to bootstrap the
Qi implementation without being an ultra-guru).
Of course, C++ compilers often *appear* to not halt when compiling
anyway ;}