package herdtools7

  1. Overview
  2. Docs

Error handling for Asllib.

type error_handling_time =
  1. | Static
  2. | Dynamic
type error_desc =
  1. | BadField of string * AST.ty
  2. | MissingField of string list * AST.ty
  3. | BadSlices of error_handling_time * AST.slice list * int
  4. | TypeInferenceNeeded
  5. | UndefinedIdentifier of AST.identifier
  6. | MismatchedReturnValue of string
  7. | BadArity of AST.identifier * int * int
  8. | UnsupportedBinop of AST.binop * AST.literal * AST.literal
  9. | UnsupportedUnop of AST.unop * AST.literal
  10. | UnsupportedExpr of AST.expr
  11. | MismatchType of string * AST.type_desc list
  12. | NotYetImplemented of string
  13. | ConflictingTypes of AST.type_desc list * AST.ty
  14. | AssertionFailed of AST.expr
  15. | CannotParse
  16. | UnknownSymbol
  17. | NoCallCandidate of string * AST.ty list
  18. | TooManyCallCandidates of string * AST.ty list
  19. | BadTypesForBinop of AST.binop * AST.ty * AST.ty
  20. | CircularDeclarations of string
  21. | UnpureExpression of AST.expr
  22. | UnreconciliableTypes of AST.ty * AST.ty
  23. | AssignToImmutable of string
  24. | AlreadyDeclaredIdentifier of string
  25. | BadReturnStmt of AST.ty option
  26. | UnexpectedSideEffect of string
  27. | UncaughtException of string
  28. | OverlappingSlices of AST.slice list
  29. | BadLDI of AST.local_decl_item
  30. | BadRecursiveDecls of AST.identifier list
  31. | UnrespectedParserInvariant
  32. | ConstrainedIntegerExpected of AST.ty
  33. | ParameterWithoutDecl of AST.identifier
  34. | BaseValueEmptyType of AST.ty
exception ASLException of error
type 'a result = ('a, error) Result.t
val fatal : error -> 'a
val fatal_from : 'a AST.annotated -> error_desc -> 'b
val fatal_here : AST.position -> AST.position -> error_desc -> 'a
val fatal_unknown_pos : error_desc -> 'a
val intercept : (unit -> 'a) -> unit -> ('a, error) result
val error_handling_time_to_string : error_handling_time -> string
val pp_error : Format.formatter -> error_desc AST.annotated -> unit
val error_to_string : error_desc AST.annotated -> string
val eprintln : error_desc AST.annotated -> unit
OCaml

Innovation. Community. Security.