 syntaxType = (expression) ->
   # ignore type classes for now
   if isName expression
-    expression.label = if isCapital then 'typename' else 'typevar'
+    expression.label = if isNotCapital expression then 'typevar' else 'typename'
   else if isTuple expression
     map syntaxType, (_terms expression)
   else if isCall expression


# Either a type variable or type constructor of some kind
atomicType = (name, kind) ->
  if /^[A-Z]/.test name
    new TypeConstr name, kind
  else
    new TypeVariable name, kind

tupleType = (arity) ->
  new TypeConstr "[#{arity}]", kindFn arity

  #   'empty-array', (type: (parseUnConstrainedType '(Fn (Array a))'), arity: [])
  #   'cons-array', (type: (parseUnConstrainedType '(Fn a (Array a) (Array a))'), arity: ['what', 'onto'])

# desiplifyTypeAndArity = (simple) ->
#   type = parseUnConstrainedType simple
#   args = collectArgs type.type.type
#   arity = if Array.isArray args then args.length else 0
#   type: type
#   arity: ("a#{i}" for i in  [0...arity - 2])

# parseUnConstrainedType = (string) ->
#   quantifyAll toConstrained typeCompile astize tokenize string

# desiplifyType = (simple) ->
#   if Array.isArray simple
#     typeFn (map desiplifyType, simple)...
#   else if /^[A-Z]/.test simple
#     typeConstant simple
#   else
#     new TypeVariable simple, star


# Set/Map implementation
