fix usage (-f => -d); remove "$" from (!^) in type.ml