           (substituteList ctx.substitution, matched.tea.constraints)
         # log "assign type", name, (printType currentType), retainedConstraints
         ctx.assignType name,
-          if ctx.isAtDeferrableDefinition()
+          if polymorphic
             quantifyUnbound ctx, (addConstraints currentType, retainedConstraints)
           else
             toForAll currentType

    if not kind
      throw new Error "Provide kind in freshTypeVariable"
    name = (freshName @typeVariabeIndex++)
    # Massive hack to avoid clashes in type classes, need to fix this properly
    # by renaming
    if inSet @allBoundTypeVariables(), name
      @freshTypeVariable kind
    else
      new TypeVariable name, kind

  extendSubstitution: (substitution) ->
    @substitution = joinSubs substitution, @substitution


      ctx.newScope() # for variables defined inside pattern
      ctx.defineNonDeferrablePattern pattern
      {precs, assigns} = patternCompile ctx, pattern, subject, no

      # Compile the result, given current scope
      ctx.setAssignTo undefined
