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

Preprocessor error for bitmatch after semicolon #13

Open
GoogleCodeExporter opened this issue Jul 31, 2015 · 1 comment
Open

Preprocessor error for bitmatch after semicolon #13

GoogleCodeExporter opened this issue Jul 31, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. make

What is the expected output? What do you see instead?

expected compile without errors; got the following output:

make
ocamlfind ocamlc test1.ml -package bitstring.syntax -syntax bitstring
File "test1.ml", line 8, characters 11-12:
Error: Unbound value v
make: [all] Error 2 (ignored)
ocamlfind ocamlc test2.ml -package bitstring.syntax -syntax bitstring
File "test2.ml", line 10, characters 6-14:
Parse error: "end" expected after [class_structure] (in [class_expr])
File "test2.ml", line 1, characters 0-1:
Error: Preprocessor error


What version of the product are you using? On what operating system?
bitstring 2.0.2, ocaml 3.11.2, gentoo linux 32 bit

Please provide any additional information below.

It looks like for some reason bitmatch expression does not like simicolon 
before it. I attached two samples - one for with regular function, other with 
class.

Original issue reported on code.google.com by [email protected] on 15 Sep 2010 at 9:13

Attachments:

@GoogleCodeExporter
Copy link
Author

Put parentheses around the bitmatch statement:

let test v =
  f ();
  (bitmatch v with
   | {_} -> ())

I believe this is mentioned in the documentation.

Original comment by [email protected] on 22 Sep 2010 at 11:06

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

1 participant