Restrict types of value and metavar (fix #46).