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

example usage with dune #8

Open
nrolland opened this issue Nov 9, 2018 · 4 comments
Open

example usage with dune #8

nrolland opened this issue Nov 9, 2018 · 4 comments

Comments

@nrolland
Copy link

nrolland commented Nov 9, 2018

it would be helpful to have a sample project using dune to play with

@nrolland
Copy link
Author

nrolland commented Nov 9, 2018

naively pasting the example I had some error with non-interactive code

Error: The type of this expression,
(_[> Binop of _[> Add | Div | Mul | Sub ] * 'a * 'a | Int of int ]
as 'a, '_weak1)
operator list list, contains type variables that cannot be generalized

which seems to indicate that some type annotation is required as in common error message

@murmour
Copy link
Owner

murmour commented Nov 10, 2018

it would be helpful to have a sample project using dune to play with

Request taken!

I've never found time to get into dune (although I wanted to), so this is a good opportunity to get familiar with it.

@murmour
Copy link
Owner

murmour commented Nov 10, 2018

naively pasting the example I had some error with non-interactive code

Hmm. This wasn't an issue in earlier versions of OCaml. I'll rework the provided example. Thanks for reporting!

@nrolland
Copy link
Author

nrolland commented Nov 14, 2018

It's my mistake : I did not use all of the example, and the missing part caused a pb with variant record, to which the interactive version was more lenient (hence my confusion).

here's a very simple example using dune : https://github.com/nrolland/oparser

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

No branches or pull requests

2 participants