-- file Log.Mesa
-- last modified by Satterthwaite, October 30, 1979  3:06 PM

DIRECTORY
  Symbols: FROM "symbols" USING [HTIndex, ISEIndex],
  Tree: FROM "tree" USING [Index, Link];

Log: DEFINITIONS =
  BEGIN

  ErrorCode: TYPE = {
    
   -- general purpose errors (no parameters)
    compilerError,
    unimplemented,
    other,

   -- errors with no parameters
    bodyEntries,
    bodyType,
    catchLabel,
    descriptor,
    exit,
    exportedVars,
    fieldSize,
    illDefinedReturn,
    inlineType,
    interfaceEntries,
    keys,
    long,
    misplacedCatch,
    misplacedEntry,
    misplacedMonitorRef,
    misplacedResume,
    misplacedReturn,
    misplacedStop,
    missingBinding,
    noAccess,
    nonOrderedType,
    nonTypeCons,
    nonVoidStmt,
    instLength,
    relative,
    staticNesting,
    stringLength,
    subrangeBounds,
    subrangeNesting,
    unreachable,

   -- errors mapping hash to sei parameters
    unknownId,
    unknownField,

   -- errors with hash parameters
    ambiguousId,
    duplicateId,
    missingImport,
    unknownTag,
    duplicateTag,
    unknownVariant,
    unknownKey,
    duplicateKey,
    omittedKey,
    openId,
    fileName,
    fileVersion,
    fileWrong,
    moduleId,

   -- errors with sei parameters
    addressOverflow,
    circularType,
    circularValue,
    elision,
    forwardRef,
    inlineRhs,
    internalCall,
    missingBase,
    missingLock,
    nonDefinition,
    nonTagType,
    nonTypeId,
    notImported,
    recordGap,
    recursiveInline,
    typeLength,
    varExport,

   -- errors with tree parameters
    boundsFault,
    controlId,
    default,
    defaultForm,
    duplicateLabel,
    exportClash,
    misusedInline,
    mixedRepresentation,
    noApplication,
    nonAddressable,
    nonConstant,
    nonLHS,
    nonVariantLabel,
    noTarget,
    notPortable,
    noVariants,
    overflow,
    relationType,
    sizeClash,
    spuriousBinding,
    typeClash,
    unknownLabel,

   -- errors with numeric parameters
    listShort,
    listLong,

   -- warnings with no parameters
    attrClash,
    pointerInit,

   -- warnings with sei parameters
    privateExport,
    uninitialized,
    unusedExport,
    unusedId,
    unusedImport,
    voidExport,

   -- warnings with tree parameters
    unsignedCompare
    };


  Error: PROCEDURE [ErrorCode];
  ErrorHti: PROCEDURE [ErrorCode, Symbols.HTIndex];
  ErrorN: PROCEDURE [ErrorCode, INTEGER];
  ErrorNode: PROCEDURE [ErrorCode, Tree.Index];
  ErrorSei: PROCEDURE [ErrorCode, Symbols.ISEIndex];
  ErrorString: PROCEDURE [ErrorCode, STRING];
  ErrorTree: PROCEDURE [ErrorCode, Tree.Link];

  Warning: PROCEDURE [ErrorCode];
  WarningNode: PROCEDURE [ErrorCode, Tree.Index];
  WarningSei: PROCEDURE [ErrorCode, Symbols.ISEIndex];
  WarningTree: PROCEDURE [ErrorCode, Tree.Link];

  END.