Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000200OCaml~DO NOT USE (was: OCaml general)public2000-10-12 14:012001-01-12 11:32
Assigned To 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000200: rhs_start and ...


I have two remarks about ocaml.

1/ the function "Parsing.rhs_start" gives sometimes erroneous results;
It seems that it is the case when the lexer have several entrypoints

2/ is there any fundamental reason to restrict the pattern-matching in
    the "try-with" construction?

# exception Toto of int*int;;
exception Toto of int * int
# try raise (Toto(3,2));(4,4)
  with Toto(res)-> res
Characters 33-42:
The constructor Toto expects 2 argument(s),
but is here applied to 1 argument(s)

Best regards,

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
administrator (administrator)
2000-10-12 15:53

Salut Amokrane,

On Thu, Oct 12, 2000 at 01:58:45PM +0200, wrote:

> # exception Toto of int*int;;
> # try raise (Toto(3,2));(4,4)
> with Toto(res)-> res
> ;;
> Characters 33-42:
> The constructor Toto expects 2 argument(s),

C'est parce que la déclaration "Toto of int*int" définit un constructeur
avec 2 paramètres, ce qui est différent d'un constructeur avec un seul
paramètre de type couple ("Toto of (int*int)").

J'avais suggéré que l'on écrive de tels constructeurs avec la syntaxe
"currifiée" (Toto 3 2 et non Toto(3, 2)), ce qui aide à comprendre pourquoi
"with Toto(res)" est incorrect, mais ça n'a pas eu l'air de déclencher
l'enthousiasme des foules...

Daniel de RAUGLAUDRE [^]

administrator (administrator)
2001-01-12 11:32

Not enough context to understand problem 1.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 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