               res (check-types type (get-type expr) [nvars (with-type [:ret expr] (get-type expr))] location)
               ]
              res)
-      :incr (annotate-incr vars location (second code) :incr)
-      :decr (annotate-incr vars location (second code) :decr)
+      :incr (annotate-incr glob-state vars location (second code) :incr)
+      :decr (annotate-incr glob-state vars location (second code) :decr)
       :decl (domonad phase-m
               [type (m-result (second code))
                decls (m-result (rest (rest code)))

      [[type num] (lookup-var vars [:ident name] location)
       res (check-types [:int] type [vars (with-type [key [:ident num]] [:int])] location)]
      res)
    ))

(defn- annotate-code

    ))

(defn- annotate-incr
  [glob-state vars location eident key]
  (match eident
    [:vident name]
    (domonad phase-m
