 
 callInferSingle = (ctx, originalOperator, operatorTea, argTea) ->
   returnType = withOrigin (ctx.freshTypeVariable star), originalOperator
-  callType = withOrigin (typeFn argTea.type, returnType), originalOperator
+  callType = mapOriginOnFunction (typeFn argTea.type, returnType), originalOperator
   unify ctx, operatorTea.type, callType
   new Constrained (join operatorTea.constraints, argTea.constraints), returnType
 
 callZeroInfer = (ctx, originalOperator, operatorTea) ->
   returnType = withOrigin (ctx.freshTypeVariable star), originalOperator
-  callType = withOrigin (typeFn returnType), originalOperator
+  callType = mapOriginOnFunction (typeFn returnType), originalOperator
   unify ctx, operatorTea.type, callType
   new Constrained operatorTea.constraints, returnType
 


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


    type

isFunctionType = (type) ->
  type.op?.op and (typeEq type.op.op, arrowType) or
  type.op and (typeEq type.op, zeroArrowType)

findDocsFor = (moduleName, reference) ->
  {declared: {savedScopes}} = lookupCompiledModule moduleName
