-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from thedufer/let-syntax
add both native and ppx let-syntax support, and corresponding tests
- Loading branch information
Showing
9 changed files
with
114 additions
and
5 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(lang dune 1.0) | ||
(lang dune 1.8) | ||
(name angstrom) |
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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
open Angstrom | ||
|
||
let (_ : int t) = | ||
let* () = end_of_input in | ||
return 1 | ||
|
||
let (_ : int t) = | ||
let+ (_ : char) = any_char | ||
and+ (_ : string) = string "foo" | ||
in | ||
2 |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
open Angstrom | ||
open Let_syntax | ||
|
||
let (_ : int t) = | ||
let%bind () = end_of_input in | ||
return 1 | ||
|
||
let (_ : int t) = | ||
let%map (_ : char) = any_char | ||
and (_ : string) = string "foo" | ||
in | ||
2 | ||
|
||
(* [mapn] support was introduced in ppx_let.v0.14.0, which CI does not reliably | ||
install. *) | ||
(* | ||
let (_ : int t) = | ||
let%mapn (_ : char) = any_char | ||
and (_ : string) = string "foo" | ||
in | ||
2 | ||
*) |