 
 star = '*'
 arrowType = new TypeConstr 'Fn', kindFn 2
+zeroArrowType = new TypeConstr 'Fn0', kindFn 1
 arrayType = new TypeConstr 'Array', kindFn 1
 listType = new TypeConstr 'List', kindFn 1
 hashmapType = new TypeConstr 'Map', kindFn 2

callTyping = (ctx, call) ->
  return if ctx.shouldDefer()
  terms = _terms call
  if terms.length is 1
    malformed ctx, call, 'Missing an argument (for now)'
    terms = join terms, [tea: toConstrained (markOrigin (ctx.freshTypeVariable star), call)]
  call.tea = callInfer ctx, (_operator call), terms

callInfer = (ctx, operator, terms) ->
  # Curry the call

  else
    new KindFn arg, kindFnOfArgs args...

typeFn = (argType, args...) ->
  if _empty args
    new TypeApp zeroArrowType, argType
  else
    properTypeFn argType, args...

properTypeFn = (from, to, args...) ->
  if args.length is 0
    if not to
      from
    else
      new TypeApp (new TypeApp arrowType, from), to
  else
    properTypeFn from, (properTypeFn to, args...)

applyKindFn = (fn, arg, args...) ->
  if not arg
