 
 (def sexp-to-constructor (constructor)
      (match constructor
-            (Symbol name range)                        (Result (SimpleConstructor name range))
-            (List (Cons (Symbol name _) types) range)  (sexp-to-complex-constructor name types range)
-            (List _ range)                             (Error (MalformedConstructorError range))))
+            (Symbol name range)
+                (Result (SimpleConstructor name range))
+            (List (Cons (Symbol name _) types) range)
+                (sexp-to-complex-constructor name types range)
+            (List _ range)
+                (Error (MalformedConstructorError range))))
 
 (def sexp-to-constructors (constructors)
      (result-of-list (list-map sexp-to-constructor constructors)))


(def sexp-to-function-type (name parameters range)
     (match parameters
            (Cons (List arg-types _) (Cons return-type Empty))  (result-flatmap (fn (arg-types)
                                                                (result-map     (fn (return-type)
                                                                                    (FunctionType arg-types return-type range))
                                                                                (sexp-to-type return-type)))
                                                                                (sexp-to-types arg-types))
            _                                          (Error (MalformedTypeError range))))

(def sexp-to-complex-or-function-type (name parameters range)
     (match (function-type? name)


(def sexp-to-type (type)
     (match type
            (List (Cons (Symbol name _) parameters) range)
                (sexp-to-complex-or-function-type name
                                                  parameters
                                                  range)
            (Symbol name range)
                (Result (SimpleType name range))
            (List _ range)
                (Error (MalformedTypeError range))))

(def sexp-to-types (types)
     (result-of-list (list-map sexp-to-type types)))
