(* Exception definitions *) (* $Id: exn.ml,v 1.14 2000/07/19 14:25:22 alamstei Exp $ *) open Lambda open Types (* thrown during parsing by Frontend module. int*int is character count *) exception Syntax_error of int*int (* thrown by lexer. string is offending character, int*int is character count *) exception Illegal_character of string*int*int (* thrown by lexer. string is offending number, int*int is character count *) exception Illegal_range of string*int*int (* thrown by lexer. string is an error message, int*int is character count *) exception Illegal_projection of string*int*int (* thrown by lexer. string is an error message, int*int is character count *) exception Illegal_injection of string*int*int (* thrown by parser. each (int*int*variable*lambdaterm) is an injection in the case distinction (i.e. of the form inji/n x M) *) exception Illegal_casedist of (int*int*variable*lambdaterm) list (* thrown by type checker in Typing module *) exception Unbound_variable of variable (* thrown by any module where an internal bug is encountered. if the code works as intended, this should never be thrown. string is the name of the module and function where the error was detected. *) exception Compiler_exception of string (* thrown by type checker in Unifier module *) exception Can't_unify of typeexp*typeexp (* thrown by cbn.ml and stdlib.ml *) exception Runtimeerror of string*lambdaterm;;