-
Notifications
You must be signed in to change notification settings - Fork 27
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
Cleanup and new tests #87
Merged
+405
−208
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
6acbb18
Cppo_eval.mli: make the type [env] abstract.
fpottier 32f6e24
Cppo_types: break useless recursion between [node] and previous types.
fpottier 937f1bd
Cppo_types: introduce some type abbreviations, for clarity.
fpottier 5a6208d
Cppo_eval: isolate the auxiliary function [check_arity].
fpottier cf90d41
Cppo_eval: remove a dead test.
fpottier e15d4d0
Cppo_types, cppo_parser, cppo_eval: simplify the type of [`Ident].
fpottier b503c97
Cppo_eval: remove [ESpecial], which was noisy.
fpottier 1a7a2bd
Cppo_eval: clean up the definition of [builtins].
fpottier c6889b9
Cppo_eval: introduce [find_opt].
fpottier 4b746a4
Cppo_eval: isolate the auxiliary function [text].
fpottier 8b0bceb
Switch to dune 2.0.
fpottier c9d8738
Add new tests.
fpottier d2f93b8
Cppo_eval: remove the distinction between [EDef] and [EDefun].
fpottier 794fd2c
Update the expected output of two negative tests.
fpottier 4c94688
Remove the distinction between [`Def] and [`Defun].
fpottier f9f246d
dune-project: records that cppo_ocamlbuild needs dune 2.0 too.
fpottier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,5 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
build: [ | ||
["dune" "subst"] {pinned} | ||
["dune" "build" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" name "-j" jobs] {with-test} | ||
["dune" "build" "-p" name "@doc"] {with-doc} | ||
] | ||
maintainer: [ | ||
"Martin Jambon <[email protected]>" "Yishuai Li <[email protected]>" | ||
] | ||
authors: ["Martin Jambon"] | ||
bug-reports: "https://github.com/ocaml-community/cppo/issues" | ||
homepage: "https://github.com/ocaml-community/cppo" | ||
doc: "https://ocaml-community.github.io/cppo" | ||
license: "BSD-3-Clause" | ||
dev-repo: "git+https://github.com/ocaml-community/cppo.git" | ||
synopsis: "Code preprocessor like cpp for OCaml" | ||
description: """ | ||
Cppo is an equivalent of the C preprocessor for OCaml programs. | ||
|
@@ -27,8 +12,31 @@ Cppo is: | |
* reasonably fast | ||
* simple to install and to maintain | ||
""" | ||
maintainer: [ | ||
"Martin Jambon <[email protected]>" "Yishuai Li <[email protected]>" | ||
] | ||
authors: ["Martin Jambon"] | ||
license: "BSD-3-Clause" | ||
homepage: "https://github.com/ocaml-community/cppo" | ||
doc: "https://ocaml-community.github.io/cppo" | ||
bug-reports: "https://github.com/ocaml-community/cppo/issues" | ||
depends: [ | ||
"ocaml" {>= "4.02.3"} | ||
"dune" {>= "1.10"} | ||
"dune" {>= "2.0"} | ||
"base-unix" | ||
] | ||
build: [ | ||
["dune" "subst"] {pinned} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/ocaml-community/cppo.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
build: [ | ||
["dune" "subst"] {pinned} | ||
["dune" "build" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" name "-j" jobs] {with-test} | ||
["dune" "build" "-p" name "@doc"] {with-doc} | ||
] | ||
maintainer: [ | ||
"Martin Jambon <[email protected]>" "Yishuai Li <[email protected]>" | ||
] | ||
authors: ["Martin Jambon"] | ||
bug-reports: "https://github.com/ocaml-community/cppo/issues" | ||
homepage: "https://github.com/ocaml-community/cppo" | ||
doc: "https://ocaml-community.github.io/cppo" | ||
license: "BSD-3-Clause" | ||
dev-repo: "git+https://github.com/ocaml-community/cppo.git" | ||
synopsis: "Plugin to use cppo with ocamlbuild" | ||
description: """ | ||
This ocamlbuild plugin lets you use cppo in ocamlbuild projects. | ||
|
||
To use it, you can call ocamlbuild with the argument `-plugin-tag | ||
package(cppo_ocamlbuild)` (only since ocaml 4.01 and cppo >= 0.9.4). | ||
""" | ||
maintainer: [ | ||
"Martin Jambon <[email protected]>" "Yishuai Li <[email protected]>" | ||
] | ||
authors: ["Martin Jambon"] | ||
license: "BSD-3-Clause" | ||
homepage: "https://github.com/ocaml-community/cppo" | ||
doc: "https://ocaml-community.github.io/cppo" | ||
bug-reports: "https://github.com/ocaml-community/cppo/issues" | ||
depends: [ | ||
"ocaml" | ||
"dune" {>= "1.10"} | ||
"ocamlbuild" | ||
"ocamlfind" | ||
] | ||
build: [ | ||
["dune" "subst"] {pinned} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/ocaml-community/cppo.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth making dune a build-only dependency?
Also, should we change the depends field for
cppo_ocamlbuild
as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making
dune
a build-only dependency: this makes sense, but I don't know how to do it. In thedune-project
file, I can write either(dune (>= 2.0))
or(dune :build)
but I am unable to combine these two declarations into a single one;dune
rejects everything I try.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the
depends
fieldcppo_ocamlbuild
seems preferable; I will add a commit to do it.