   isDeclared: (name) ->
     !!(@_declaration name)
 
+  isTyped: (name) ->
+    !!(@_declaration name).type
+
   _declaration: (name) ->
     @_declarationInScope @scopes.length - 1, name
 

      # TODO: this is because functions might declare arity before being declared
      if not ctx.isDeclared name
        ctx.declare name
      ctx.assignType name,
        if ctx.isAtDefinition()
          quantifyAll currentType
        else
          toForAll currentType
  # here I will create type schemes for all definitions
  # The problem is I don't know which are impricise, because the names are done inside the
  # pattern. I can use the context to know which types where added in the current assignment.

        ctx.declareArity ctx.definitionName(), paramNames
        # Explicit typing
        if type
          ctx.assignType ctx.definitionName(), quantifyAll typeCompile ctx, type

      paramNames = map _symbol, params
      # pattern
