     # or use the substitution instead of type below:
     mapMap (-> {name, type}), findFree substitute ctx.substitution, type)
 
-  #log "pattern compiel", definedNames
+  # log "pattern compiel", definedNames, pattern
   for {name, type} in definedNames
     currentType = substitute ctx.substitution, type
     deps = concat mapToArray intersectRight (findFree currentType), tempVars
+    # log "deciding whether to defer type", name, currentType, deps
     if deps.length > 0
       depsNames =  deps
-      #log "adding top level lhs to deferred #{name}"
+      # log "adding top level lhs to deferred #{name}"
       ctx.addToDeferred {name, type, deps: (map (({name}) -> name), deps)}
       for dep in deps
         ctx.addToDeferred {name: dep.name, type: dep.type, deps: [name]}

        .map(validIdentifier)
      paramList = paramNames.join(', ')
      paramAssigns = blockOfLines paramNames.map (name) ->
        "  this.#{name} = name;"
      constrFn = """function #{identifier}(#{paramList}) {#{paramAssigns}};"""
      constrValue = if params
        """

    else if type is undefined
      "undefined"
    else
      throw new Error "Unrecognized type in printType"

collectArgs = (type) ->
  if type.op?.op?.name is '->'
