switched grammar from map to struct
added simple support for tracing match calls

I'm not sure if dbg is going to give me exactly what I want, since I'm
interested in which function head matches, not the call and
arguments. Unless, I pass around the tree in the arguments...  Hmmmm...