       malformed typeParam, 'Data type parameter not used'
       throw new Error 'Data type parameter not used'
 
-  freshingSub = mapToSubstitution mapMap ((kind) -> ctx.freshTypeVariable kind), kinds
+  freshingSub = mapMap ((kind) -> ctx.freshTypeVariable kind), kinds
 
   dataKind = kindFnOfArgs (map ((name) -> lookupInMap kinds, name), varNames)...
   typeVars = map ((name) -> new TypeVariable name, (lookupInMap kinds, name)), varNames

      malformed param, 'A class paramater must occur in at least one method\'s type'
      false)
    return {}
  freshingSub = mapToSubstitution mapMap ((kind) -> ctx.freshTypeVariable kind), kinds
  classParam = (param) ->
    substitute freshingSub, new TypeVariable param, (lookupInMap kinds, param)
  method = ({arity, type, def}) ->

subToObject = (sub) ->
  ob = {}
  for s, i in sub.vars when s
    ob["#{i + sub.start}"] = s
  ob


