   if isCall expression
     if isAtom op
       (labelOperator op)
-      new ClassContraint op.symbol, (typeCompile ctx, args[0]) # TODO: support multiparameter type classes
+      new ClassConstraint op.symbol, new Types (typesCompile ctx, args)
     else
       malformed expression, 'Class name required in a constraint'
   else
     malformed expression, 'Class constraint expected'
 
 typeConstraintsCompile = (ctx, expressions) ->
-  filter ((t) -> t instanceof ClassContraint),
+  filter ((t) -> t instanceof ClassConstraint),
     (typeConstraintCompile ctx, e for e in expressions)
 
 typeTupleCompile = (ctx, form) ->

class TempType
  constructor: (@type) ->

class Constrained
  constructor: (@constraints, @type) ->
class ClassContraint
  constructor: (@className, @type) ->


addConstraints = ({constraints, type}, addedConstraints) ->
  new Constrained (join constraints, addedConstraints), type

#   that is either ordinary type variable or type variable standing for a constructor
#   with arbitrary type arguments
isNormalizedConstraint = (constraint) ->
  all (map isNormalizedConstraintArgument, constraint.types.types)

isNormalizedConstraintArgument = (type) ->
  if type instanceof TypeVariable
    yes
  else if type instanceof TypeConstr
    no
  else if type instanceof TypeApp
    isNormalizedConstraintArgument type.op.type


typeEq = (a, b) ->
  if a instanceof TypeVariable and b instanceof TypeVariable or
