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

Refman tells fun can take a guard. #6844

Closed
vicuna opened this issue Apr 22, 2015 · 3 comments
Closed

Refman tells fun can take a guard. #6844

vicuna opened this issue Apr 22, 2015 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Apr 22, 2015

Original bug ID: 6844
Reporter: furuse
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:48:58Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.02.1
Category: documentation

Bug description

As indicated in http://stackoverflow.com/questions/29788717/ocaml-when-guard-in-fun , the refman's BNF (http://caml.inria.fr/pub/docs/manual-ocaml/expr.html) says fun can take a guard:

| fun multiple-matching

multiple-matching ::= { parameter }+ [when expr] -> expr

but it does not.

The section "Guards in pattern-matchings" also states fun can take a guard.

@vicuna
Copy link
Author

vicuna commented Apr 22, 2015

Comment author: @yallop

There's a pull request here that fixes this:

ocaml/ocaml-manual#2

@vicuna
Copy link
Author

vicuna commented Apr 22, 2015

Comment author: furuse

Woow, you guys are too good!

@vicuna
Copy link
Author

vicuna commented Apr 26, 2015

Comment author: @gasche

Fixed by applying Jeremy's patch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants