 
 
 
-(def def-symbol (range)
-     (Symbol (list 100 101 102) range))
-
-(def typ-symbol (range)
-     (Symbol (list 116 121 112) range))
-
-(def fn-symbol (range)
-     (Symbol (list 102 110) range))
 
 (def type-to-sexp (type)
      (match type
             (SimpleType name range)
                 (Symbol name range)
             (FunctionType arg-types return-type range)
-                (List (Cons (fn-symbol range)
+                (List (Cons (Symbol (fn-string) range)
                       (Cons (List (types-to-sexp arg-types) range)
                       (Cons (type-to-sexp return-type) Empty))) range)
             (ComplexType name types range)

                (string-concat (list 77 97 108 102 111 114 109 101 100 84 121 112 101 69 114 114 111 114)
                               (error-range-to-string range))))


(def type-definition? (kind)
     (string-equal? kind (list 116 121 112)))

(def fn-symbol? (type)
     (string-equal? type (list 102 110)))

(def function-definition? (kind)
     (string-equal? kind (list 100 101 102)))

(def sexp-to-complex-type (name parameters range)
     (result-map (fn (sub-types)
                     (ComplexType name sub-types range))

     (list-map constructor-to-sexp constructors))

(def type-definition-to-sexp (type constructors range)
     (List (list-concat (list (Symbol (typ-string) range) (type-to-sexp type))
                        (constructors-to-sexp constructors))
           range))

