 
   # Properly bind types according to the pattern
   if pattern.tea
-    # log pattern, matched, matched.tea, pattern.tea
+    # log "pattern", matched.tea, pattern.tea
     unify ctx, matched.tea.type, pattern.tea.type
 
   # log "pattern compiel", definedNames, pattern

  # Or we can just mangle the name like PureScript does it
]



testNamed = (givenName) ->
  for [name, source, expression, result] in tuplize 4, tests when name is givenName
    return source

  for className, dict of values ctx.classParamsForType constraint
    if chain = findSuperClassChain ctx, className, constraint.className
      return accessList dict, chain
  throw new Error "Couldn't find dict for #{safePrintType constraint}"

findSuperClassChain = (ctx, className, targetClassName) ->
  for s in (ctx.classNamed className).supers
