add an experimental deep embedding of pattern matching

this is work in progress and far from finished