 assignCompile = (ctx, expression, translatedExpression) ->
   # if not translatedExpression # TODO: throw here?
     #log expression
-  if to = ctx._nameExpression()
+  if ctx.isAtDefinition()
+    to = ctx.definitionPattern()
 
     ctx.setGroupTranslation()
     {precs, assigns} = patternCompile ctx, to, expression, translatedExpression
 
-    #log "ASSIGN #{ctx._name()}", ctx.shouldDefer()
+    #log "ASSIGN #{ctx.definitionName()}", ctx.shouldDefer()
     if ctx.shouldDefer()
       ctx.addDeferredDefinition ctx.shouldDefer().concat to, expression
       return 'deferred'

        # log "done unifying one"
    # log "done unifying"
    for name of values names
      # log "done"
      ctx.addType name, substitute ctx.substitution, canonicalType
      # log "added"

compileDeferred = (ctx) ->
  compiledPairs = []
  if _notEmpty ctx.deferred()
    deferredCount = 0
    while (_notEmpty ctx.deferred()) and deferredCount < ctx.deferred().length
      prevSize = ctx.deferred().length
      [expression, dependencyName, lhs, rhs] = deferred = ctx.deferred().shift()
      if ctx.declaration dependencyName
        compiledPairs.push definitionPairCompile ctx, lhs, rhs
      else
        # If can't compile, defer further

          syntaxType type
      else
        typeArgs.label = 'malformed'
    dataName = ctx.definitionName()
    if not dataName
      return 'malformed'

    # Types, Arity
    for [constr, params] in defs
      constrType = desiplifyType if params
        join (_labeled _terms params).map(_snd).map(_symbol), [dataName]
      else
        dataName
      # TODO support polymorphic data
      #log "Adding constructor #{constr.symbol}"
      ctx.declare constr.symbol,
        type: toForAll constrType
        arity: ((_labeled _terms params).map(_fst).map(_labelName) if params)
      constr.tea = constrType
    # We don't add binding to kind constructors, but maybe we need to
    # ctx.addType dataName, typeConstant dataName

    # Translate
    listOfLines (for [constr, params] in defs
      identifier = validIdentifier constr.symbol
