src/Pure/ML/ml_compiler_polyml-5.3.ML
changeset 38874 4a4d34d2f97b
parent 38720 7f8bc335e203
child 39227 4985f4706c6d
equal deleted inserted replaced
38873:278f552b2e97 38874:4a4d34d2f97b
     1 (*  Title:      Pure/ML/ml_compiler_polyml-5.3.ML
     1 (*  Title:      Pure/ML/ml_compiler_polyml-5.3.ML
     2     Author:     Makarius
     2     Author:     Makarius
     3 
     3 
     4 Advanced runtime compilation for Poly/ML 5.3.0.
     4 Advanced runtime compilation for Poly/ML 5.3.0.
     5 *)
     5 *)
     6 
       
     7 signature ML_COMPILER =
       
     8 sig
       
     9   val exn_position: exn -> Position.T
       
    10   val exn_message: exn -> string
       
    11   val eval: bool -> Position.T -> ML_Lex.token list -> unit
       
    12 end
       
    13 
     6 
    14 structure ML_Compiler: ML_COMPILER =
     7 structure ML_Compiler: ML_COMPILER =
    15 struct
     8 struct
    16 
     9 
    17 (* source locations *)
    10 (* source locations *)
    35 fun exn_position exn =
    28 fun exn_position exn =
    36   (case PolyML.exceptionLocation exn of
    29   (case PolyML.exceptionLocation exn of
    37     NONE => Position.none
    30     NONE => Position.none
    38   | SOME loc => position_of loc);
    31   | SOME loc => position_of loc);
    39 
    32 
       
    33 val exn_messages = Runtime.exn_messages exn_position;
    40 val exn_message = Runtime.exn_message exn_position;
    34 val exn_message = Runtime.exn_message exn_position;
    41 
    35 
    42 
    36 
    43 (* parse trees *)
    37 (* parse trees *)
    44 
    38