Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhs_start and ... #2582

Closed
vicuna opened this issue Oct 12, 2000 · 2 comments
Closed

rhs_start and ... #2582

vicuna opened this issue Oct 12, 2000 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 12, 2000

Original bug ID: 200
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hi,

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,

Amok.

@vicuna
Copy link
Author

vicuna commented Oct 12, 2000

Comment author: administrator

Salut Amokrane,

On Thu, Oct 12, 2000 at 01:58:45PM +0200, Amokrane.SAIBI@simulog.fr 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 intint" 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
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/

@vicuna
Copy link
Author

vicuna commented Jan 12, 2001

Comment author: administrator

Not enough context to understand problem 1.

@vicuna vicuna closed this as completed Jan 12, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant