                                 enumerable: true
                                 configurable: true
                                 writable: true
-                        console.warn "assigned type #{ast._ejs_inferredtype}"
+                        #console.warn "assigned type #{ast._ejs_inferredtype}"
                 else if ast._ejs_inferredtype instanceof MultiType
                         # The ast node is already polymorphic, add the new type to the bunch
                         ast._ejs_inferredtype.addType ty


        toString: -> "Multi[#{t for t in @types}]"

class InferVisitor extends NodeVisitor
        constructor: (@initial_env) ->
                @stable = false
                super true

        isStable: -> @stable

        visit: (exp) ->
                console.warn "visiting #{exp.type}"
                super
        
        infer: (exp) ->

                console.warn "types are stable, returning from inference pass"
                exp

        visitProgram: (program) -> super

        visitIdentifier: (exp) ->
                if not @getType exp
                        # check if the identifier is defined in the env
                        if exp.name in @env
                                @assignType exp, @env[exp.name]
