       'malformed'
 
 findClassType = (className, paramNames, methods) ->
-  # TODO: support multi-param classes
-  [param] = paramNames
-  kind = undefined
-  constraint = undefined
+  kinds = mapMap (-> undefined), (arrayToSet paramNames)
   for name, {arity, type, def} of values methods
-    vars = findFree type.type
-    foundKind = lookupInMap vars, param
-    if not foundKind
-      # TODO: attach error to the type expression
-      malformed def, 'Method must include class parameter in its type'
-    if kind and not kindsEq foundKind, kind
-      # TODO: attach error to the type expression instead
-      # TODO: better error message
-      malformed def, 'All methods must use the class paramater of the same kind'
-    kind or= foundKind
-    constraint or= new ClassContraint className, (new TypeVariable param, kind)
-  constraint
+    for param in paramNames
+      vars = findFree type.type
+      kindSoFar = lookupInMap kinds, param
+      foundKind = lookupInMap vars, param
+      if not foundKind
+        # TODO: attach error to the type expression
+        malformed def, 'Method must include class parameter in its type'
+      if kindSoFar and not kindsEq foundKind, kindSoFar
+        # TODO: attach error to the type expression instead
+        # TODO: better error message
+        malformed def, 'All methods must use the class paramater of the same kind'
+      replaceInMap kinds, param, foundKind
+  classParam = (param) ->
+    new TypeVariable param, (lookupInMap kinds, param)
+  new ClassConstraint className, new Types (map classParam, paramNames)
 
 declareMethods = (ctx, classConstraint, methodDeclarations) ->
   for name, {arity, type} of values methodDeclarations

      return join [s], chain
  undefined

accessList = (what, list) ->
  [first, rest...] = list
  if first

    if typeMap then lookupInMap typeMap, constraint.className

  classParamsForType: (constraint) ->
    nestedLookupInMap @classParams, typeNamesOfNormalized constraint

expressionCompile = (ctx, expression) ->
  throw new Error "invalid expressionCompile args" unless ctx instanceof Context and expression
