-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get the boilerplate for rendering Hazelnut expressions ready
- Loading branch information
1 parent
9ebba4c
commit fd27b9e
Showing
9 changed files
with
103 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(executables | ||
(names main) | ||
(libraries incr_dom hazelnut_lib) | ||
(libraries incr_dom app_lib) | ||
(preprocess | ||
(pps js_of_ocaml-ppx ppx_jane))) |
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,5 @@ | ||
(library | ||
(name hazelnut_lib) | ||
(libraries core incr_dom) | ||
(preprocess | ||
(pps ppx_jane))) |
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,34 @@ | ||
[@deriving (sexp, compare)] | ||
type htyp = | ||
| Arrow(htyp, htyp) | ||
| Num | ||
| Hole; | ||
|
||
[@deriving (sexp, compare)] | ||
type hexp = | ||
| Var(string) | ||
| Lam(string, hexp) | ||
| Ap(hexp, hexp) | ||
| Num(int) | ||
| Plus(hexp, hexp) | ||
| Asc(hexp, htyp) | ||
| EHole | ||
| NEHole(hexp); | ||
|
||
[@deriving (sexp, compare)] | ||
type ztyp = | ||
| Cursor(htyp) | ||
| LArrow(ztyp, htyp) | ||
| RArrow(htyp, ztyp); | ||
|
||
[@deriving (sexp, compare)] | ||
type zexp = | ||
| Cursor(hexp) | ||
| Lam(string, zexp) | ||
| LAp(zexp, hexp) | ||
| RAp(hexp, zexp) | ||
| LPlus(zexp, hexp) | ||
| RPlus(hexp, zexp) | ||
| LAsc(zexp, htyp) | ||
| RAsc(hexp, ztyp) | ||
| NEHole(zexp); |
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,34 @@ | ||
[@deriving (sexp, compare)] | ||
type htyp = | ||
| Arrow(htyp, htyp) | ||
| Num | ||
| Hole; | ||
|
||
[@deriving (sexp, compare)] | ||
type hexp = | ||
| Var(string) | ||
| Lam(string, hexp) | ||
| Ap(hexp, hexp) | ||
| Num(int) | ||
| Plus(hexp, hexp) | ||
| Asc(hexp, htyp) | ||
| EHole | ||
| NEHole(hexp); | ||
|
||
[@deriving (sexp, compare)] | ||
type ztyp = | ||
| Cursor(htyp) | ||
| LArrow(ztyp, htyp) | ||
| RArrow(htyp, ztyp); | ||
|
||
[@deriving (sexp, compare)] | ||
type zexp = | ||
| Cursor(hexp) | ||
| Lam(string, zexp) | ||
| LAp(zexp, hexp) | ||
| RAp(hexp, zexp) | ||
| LPlus(zexp, hexp) | ||
| RPlus(hexp, zexp) | ||
| LAsc(zexp, htyp) | ||
| RAsc(hexp, ztyp) | ||
| NEHole(zexp); |
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,5 +1,5 @@ | ||
(library | ||
(name hazelnut_lib) | ||
(libraries core incr_dom) | ||
(name app_lib) | ||
(libraries core hazelnut_lib incr_dom) | ||
(preprocess | ||
(pps ppx_jane))) |
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,5 +1,5 @@ | ||
(library | ||
(name hazelnut_test) | ||
(libraries async_kernel incr_dom_testing hazelnut_lib js_of_ocaml) | ||
(libraries async_kernel incr_dom_testing app_lib js_of_ocaml) | ||
(preprocess | ||
(pps ppx_jane))) |
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