                             (ComplexType name sub-types range))
                         (result-of-list (list-map sexp-to-type parameters)))
         (Symbol name range)                             (Result (SimpleType name range))
-        _                                               (Error MalformedTypeError)))
+        (List _ range)                                  (Error (MalformedTypeError range))))
 
 (def sexp-to-definition' (kind name rest range)
     (match (type-definition? (symbol-name kind))

(def sexp-to-definition (expression)
     (match expression
        (List (Cons kind (Cons name rest)) range)  (sexp-to-definition' kind name rest range)
        _                                          (Error MalformedDefinitionError)))

(def sexps-to-definitions (expressions)
    (list-map sexp-to-definition expressions))

        (Symbol name _)  name
        _                Empty))

(typ type          (SimpleType          (list int32) range)
                   (ComplexType         (list int32) (list type) range))
(typ definition    (TypeDefinition      type sexp range)
                   (OptOut              sexp))

(typ error         (MalformedDefinitionError range)
                   (MalformedTypeError range))


(def type-definition? (type)
