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

Add Dune integration #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(library
(public_name opal)
(libraries camlp-streams))

(env
(dev
(flags (:standard -warn-error -A))))
25 changes: 25 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(lang dune 2.9)

(name opal)
(version 0.1.1)

(generate_opam_files false)

(source
(github pyrocat101/opal))

(authors "Linjie Ding <[email protected]>")

(maintainers "Linjie Ding <[email protected]>")

(license MIT)

(documentation https://github.com/pyrocat101/opal)

(package
(name opal)
(synopsis "Self-contained monadic parser combinators for OCaml")
(description "Opal is a minimum collection of useful parsers and combinators (~150 loc of OCaml) that makes writing parsers easier. It is designed to be small, self-contained, pure-functional, and only includes most essential parsers, so that one could include single file in the project or just embed it in other OCaml source code files.")
(depends camlp-streams ocamlfind)
(tags
(topics "parser" "combinator")))
5 changes: 3 additions & 2 deletions opal.mli
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ val implode : char list -> string
val explode : string -> char list
val ( % ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

type ('token, 'result) parser
val parse : ('token, 'a) parser -> 'token LazyStream.t -> 'a option
type 'token input = 'token LazyStream.t
type ('token, 'result) parser = 'token input -> ('result * 'token input) option
val parse : ('token, 'a) parser -> 'token input -> 'a option

val return : 'a -> ('token, 'a) parser
val ( >>= ) :
Expand Down