         ctx.declareArity name, paramNames
         # Explicit typing
         if type
-          explicitType = quantifyUnbound ctx, typeConstrainedCompile ctx, type
-          if ctx.isTyped name
-            malformed ctx.definitionPattern(), 'This name is already taken'
-          else
-            ctx.assignType name, explicitType
+          explicitType = assignExplicitType ctx, typeConstrainedCompile ctx, type
 
       paramTypeVars = map (-> ctx.freshTypeVariable star), params
       paramTypes = map (__ toForAll, toConstrained), paramTypeVars

      (call_ (token_ 'data'),
        [typeParamTuple, (token_ ctx.definitionName()), (tuple_ args)])

  # # Type an expression
  # ':': (ctx, call) ->
  #   [expression, type] = _arguments call
  #   if not type
  #     return malformed 'Missing type', call
  #   ctx.setIsType true
  #   ctx.setIsType false

  # Adds a class to the scope or defers if superclass doesn't exist
ms.class = ms_class = (ctx, call) ->
    hasName = requireName ctx, 'Name required to declare a new class'
    [paramList, defs...] = _validArguments call

  """
  "a", 2

  'constants in classes'
  """
  A (class [c e]
    empty (: c)

    first (fn [x] (: (Fn c e))))

  list-a (instance (A (Array a) a)
    empty {}

    first (macro [list]
      (: (Fn (Array a) a))
      (Js.call (Js.access list "first") {})))

  unshift (macro [what to]
    (: (Fn a (Array a) (Array a)))
    (Js.call (Js.access to "unshift") {what}))
  """
  "(first (unshift 3 empty))", 3


  # The following doesn't work because the Collection type class specifies
  # that the constructor takes only one argument.
  #
