Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
typep.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29open Types open Errors open Typecheck (* open Util *) (** String Primitives *) let typeofp args = if List.length args != 1 then iraise WrongPrimitiveArgs else EvtString (show_tinfo (typeof (List.hd args))) let myfailwith args = if List.length args != 1 then iraise WrongPrimitiveArgs else let msg = unpack_string (List.hd args) in let _ = iraise (InternalFailure msg) in EvtUnit let show args = match args with | [EvtString x] -> (EvtString x) | [x] -> EvtString (show_unpacked_evt x) | _ -> iraise WrongPrimitiveArgs let table = [ ("show", Primitive (show, ("show", 1, Pure))); ("string_from_value", Primitive (show, ("show", 1, Pure))); ("typeof", Primitive (typeofp, ("typeof", 1, Pure))); ("failwith", Primitive (myfailwith, ("failwith", 1, Pure))); ]