   ast = (astFromSource "(#{source})", -1, -1)
   [expression] = _terms ast
   {js} = compileCtxAstToJs topLevelExpression, ctx, expression
-  checkTypes ctx
   (attachPrintedTypes ctx, expression)
   js: library + immutable + (listOfLines map lookupJs, setToArray toInject) + js
   ast: ast
+  errors: checkTypes ctx
 
 # Primitive type checking for now
 checkTypes = (ctx) ->
   # failed = mapToArray filterMap ((name) -> name is 'could not unify'), ctx.substitution
   if _notEmpty (failed = ctx.substitution.fails)
-    throw new Error failed[0]
+    failed
 
 lookupJs = (moduleName) ->
   js = (lookupInMap compiledModules, moduleName)?.js

  #   map [0: "hello" 1:] {"world", "le mond", "svete"}
  # TODO: should we support bare records?
  #   [a: 2 b: 3]
  form.tea = tupleOfTypes (tea for {tea} in elems)

  if ctx.assignTo()
    combinePatterns compiledElems

  Array.isArray expression

isLabel = (atom) ->
  /[^\\]:$/.test atom.symbol

isCapital = (atom) ->
  /[A-Z]/.test atom.symbol
