PreviousUpNext

15.4.230  src/lib/compiler/back/low/control/lowhalf-error-message.pkg

## lowhalf-error-message.pkg

# Compiled by:
#     src/lib/compiler/back/low/lib/control.lib



api Lowhalf_Error_Msg {
    #
    exception ERROR;

    print:       String -> Void;
    impossible:  String -> X;
    error:       (String, String) -> X;
};

stipulate
    package fil =  file__premicrothread;                                # file__premicrothread  is from   src/lib/std/src/posix/file--premicrothread.pkg
herein
    package  lowhalf_error_message
    : (weak) Lowhalf_Error_Msg                                          # Lowhalf_Error_Msg     is from   src/lib/compiler/back/low/control/lowhalf-error-message.pkg
    {
        exception ERROR;
        #
        print =   \\ s =  fil::write (fil::stdout, s);

        fun impossible msg
            =
            {   apply print ["Error: Lowhalfd bug: ", msg, "\n"];
                #
                fil::flush  fil::stdout;

                raise exception ERROR;
            };

        fun error (module, msg)
            =
            impossible (module + "." + msg);
    };
end;



## COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext