impc:compiler:print-constraint-error   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmti.xtm

Implementation

(define impc:compiler:print-constraint-error
  (lambda (name type constraint . args)
    (print-with-colors *impc:compiler:pretty-print-error-color*
                       'default #t (print "Constraint Error"))
    (print " ")
    (print-with-colors *impc:compiler:pretty-print-name-color* 'default #f (print name))
    (print " failed constraint ")
    (print-with-colors *impc:compiler:pretty-print-code-color* 'default #f (print constraint))
    (print "\nwith type: ")
    (print-with-colors *impc:compiler:pretty-print-type-color* 'default #f (print type))
    (if (not (null? args))
        (begin
          (print "\nast: ")
          (define ast (cons (string->symbol name) (cdar args)))
          (print (sexpr->string ast))))
    (println)
    (if (impc:aot:currently-compiling?)
        (quit 2)
        (throw ""))))


Back to Index