MODULE; IMPORT ObLib, ObValue, Obliq, SynLocation; PROCEDURE ObInt M3ToObliq (val : INTEGER) : ObValue.Val = BEGIN RETURN NEW (ObValue.ValInt, int := val); END M3ToObliq; PROCEDUREObliqToM3 (val : ObValue.Val) : INTEGER RAISES {ObValue.Error} = BEGIN TYPECASE val OF | ObValue.ValInt (node) => RETURN node.int; ELSE Obliq.RaiseError ("Expected Int"); RETURN 0; (* ... only to suppress compiler warning *) END; END ObliqToM3; PROCEDUREGetArg (args : ObValue.ArgArray; idx : INTEGER; package : ObLib.T; opCode : ObLib.OpCode; loc : SynLocation.T) : INTEGER RAISES {ObValue.Error} = BEGIN TYPECASE args[idx] OF | ObValue.ValInt (node) => RETURN node.int; ELSE ObValue.BadArgType (idx, "int", package.name, opCode.name, loc); RETURN 0; (* ... only to suppress compiler warning *) END; END GetArg; BEGIN END ObInt.