     (succ [vars (with-type [:erel lexpr relop rexpr] [:bool])])
 
     [lexpr rexpr (:or [:eq] [:ieq])]
-    (if (= (get-type lexpr)
+    (if (check-types-helper glob-state (get-type lexpr)
           (get-type rexpr))
       (succ [vars (with-type [:erel lexpr relop rexpr] [:bool])])
-      (err (str "expr invalid; expected " (get-type lexpr) ", found " (get-type rexpr)
-             " in: " location))
+      (err (str "expr invalid; expected " (print-type (get-type lexpr)) ", found "
+             (print-type (get-type rexpr)) " in: " location))
       )
 
     :else

              [[vars1 lexpr] (annotate-expr glob-state vars (second expr))
               [vars2 rexpr] (annotate-expr glob-state vars1 (fourth expr))
               op (m-result (third expr))
               res (annotate-erel vars2 lexpr rexpr op location)
               ]
              res)
      :emul (domonad phase-m

  (= (get-type x) [:int]))

(defn- annotate-erel
  [glob-state vars lexpr rexpr relop location]
  (match [lexpr rexpr relop]
    [(lexpr :guard #(is-str %)) (rexpr :guard #(is-str %)) [:eq]]
    (succ [vars (with-type [:eapp [:ident "_eqStrings"] [lexpr rexpr]] [:bool])])
