   isAtDefinition: ->
     (definition = @_currentDefinition()) and definition.inside is 0
 
+  isAtSimpleDefinition: ->
+    @isAtDefinition() and @definitionName()
+
   # isInsideDefinition: ->
   #   (definition = @_currentDefinition()) and definition.inside isnt 0
 

        (isName expression) and (_symbol expression) in paramNames
      labelUsedParams = (expression) ->
        map (syntaxNameAs '', 'param'), filterAst isUsedParam, expression
      map labelUsedParams, join [body], wheres

      # Arity - before deferring instead put to assignCompile, because this makes the naming of functions special
      if ctx.isAtDefinition()
        #log "adding arity for #{ctx.definitionName()}", paramNames
        ctx.declareArity ctx.definitionName(), paramNames

      assignCompile ctx, call,
        if ctx.shouldDefer()
          'deferred'
        else
          # Typing
          if not body.tea
            #log body
            throw new Error "Body not typed"
          call.tea = typeFn (map _type, paramTypes)..., body.tea

        [type, body, wheres...] = defs
      else
        [body, wheres...] = defs

      # Arity - before deferring instead? put to assignCompile, because this makes the naming of functions special
      if ctx.isAtSimpleDefinition()
        #log "adding arity for #{ctx.definitionName()}", paramNames
        ctx.declareArity ctx.definitionName(), paramNames
        # Explicit typing
        if type
          ctx.assignType ctx.definitionName(), typeCompile ctx, type

      paramNames = map _symbol, params
      # pattern
      paramTypes = map (-> toForAll ctx.freshTypeVariable star), params
