extendRule :: Name -> Exp -> Env -> Env
extendRule v ts e@(Env {rules}) = e{rules =  (v , ts) : rules}
extendRule :: Name -> Exp -> Env -> Env
extendRule v ts e@(Env {rules}) = e{rules =  (v , ts) : rules}
extendRule v ts e@(Env {rules}) = e{rules =  (v , ts) : rules}