Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000046OCaml~DO NOT USE (was: OCaml general)public2000-03-03 16:392001-06-25 10:10
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000046: aliasing exceptions with a let ?
DescriptionFull_Name: Ralf Treinen
Submission from: (
Submitted by: doligez

Subject: aliasing exceptions with a let ?
Date: Wed, 01 Mar 2000 17:22:08 +0100
From: Ralf Treinen <>

Is it possible to alias an exception as with functions or type definitions?
I would like to write a module that is a "virtual module" in the sense
that it just regroups identifiers that are defined in other modules.
This works fine for types and functions:

  type running_prog = Programs.running_prog;;
  let is_finished = Programs.is_finished;;

Apparently, I cannot do the same thing with exceptions (and hence
with functions that raise an exception). The obvious solution is to
write a wrapper as in

  exception Erreur_load of string;;
  let load s =
      Analyse_program.load s
        Analyse_program.Erreur_load s -> raise (Erreur_load s)

which is quite awkward. It would be nice to have a way to define an alias
for an exception in the same way as for identifiers and types.

Ralf Treinen.

Ralf Treinen, L.R.I. Bât. 490, Université Paris-Sud,
F91405 Orsay cedex, France. [^]

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
administrator (administrator)
2000-03-26 18:12

Implemented in 3.00

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker