Skip to content
Merged
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eval $(opam env)
Comment thread
bodzioney marked this conversation as resolved.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4.14.x
ocaml-compiler: 5.4.x

- name: Install Opam packages
run: opam pin add -n .; opam install eff --deps-only
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4.14.x
ocaml-compiler: 5.4.x

- name: Install Opam packages
run: opam pin add -n .; opam install eff --deps-only
Expand All @@ -22,4 +22,4 @@ jobs:
run: opam exec -- make format

- name: Test
run: opam exec -- make test
run: opam exec -- make test
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
_build
_opam
# Executable
eff.exe
docs/try/jseff.bc.js

# Backup files
*~

# Direnv
.envrc

# Silly Mac OS X files
.DS_Store

Expand All @@ -17,4 +21,4 @@ docs/try/jseff.bc.js
.merlin

misc/code-generation-benchmarks/generate-graphs/tables/*.table
graphs.exe
graphs.exe
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.25.1
version=0.29.0
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ on Windows, we just have not tested it yet.

To install Eff, you need a standard Unix-style build environment as well as

1. [OCaml](https://ocaml.org/), version 4.14.1 or newer,
1. [OCaml](https://ocaml.org/), version 5.4.1 or newer,
2. [Js_of_ocaml](http://ocsigen.github.io/js_of_ocaml) compiler from OCaml bytecode to Javascript
3. its syntax extension `js_of_ocaml-ppx`,
4. [Menhir](http://gitlab.inria.fr/fpottier/menhir) LR(1) parser generator,
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
js_of_ocaml-ppx
menhir
(ocaml (>= 4.14.1))
(ocamlformat (= 0.25.1))))
(ocamlformat (= 0.29.0))))
2 changes: 1 addition & 1 deletion eff.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ depends: [
"js_of_ocaml-ppx"
"menhir"
"ocaml" {>= "4.14.1"}
"ocamlformat" {= "0.25.1"}
"ocamlformat" {= "0.29.0"}
"odoc" {with-doc}
]
build: [
Expand Down
20 changes: 10 additions & 10 deletions misc/code-generation-benchmarks/benchmark-suite/parserNative.ml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(***********************************
*********** The Parser *************
***********************************)
*********** The Parser *************
***********************************)

exception Fail

(********************************
* Handlers
********************************)
* Handlers
********************************)

(* let parse = handler
| val y -> (fun s ->
Expand Down Expand Up @@ -55,8 +55,8 @@ let rec parseNum (l, v) =
let rec toNum l = parseNum (l, 0)

(********************************
* Parser :: FAIL
********************************)
* Parser :: FAIL
********************************)

(* | [] -> raise Fail
| y :: ys ->
Expand All @@ -83,8 +83,8 @@ let rec toNum l = parseNum (l, 0)
;; *)

(********************************
* Parser :: OPTION
********************************)
* Parser :: OPTION
********************************)

let get_symbol c d =
match d with
Expand Down Expand Up @@ -176,8 +176,8 @@ let rec expr d =
| (a2, b2) :: xs -> [ (a1 + a2, b2) ]))))

(********************************
* Example
********************************)
* Example
********************************)

(* expr ["2"; "+"; "4"; "3"; "*"; "("; "3"; "+"; "3"; ")"];;
expr ["4"; "5"; "+"];; *)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ let loop_incr__direct n =
(let _y_60 = _x_59 in
fun (_x_61 : int) -> _x_61));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Incr ->
fun () _l_64 ->
Expand Down Expand Up @@ -159,8 +162,11 @@ let loop_incr__purity_aware n =
(let _y_60 = _x_59 in
fun (_x_61 : int) -> _x_61));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Incr ->
fun () _l_64 ->
Expand Down Expand Up @@ -219,8 +225,11 @@ let loop_state__direct n =
handler
{
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Put ->
fun (_s'_45 : int) _l_61 ->
Expand Down Expand Up @@ -262,8 +271,11 @@ let loop_state__purity_aware n =
handler
{
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Put ->
fun (_s'_45 : int) _l_61 ->
Expand Down
85 changes: 58 additions & 27 deletions misc/code-generation-benchmarks/benchmark-suite/treeOpt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ let _test_leaf_state_422 (_m_423 : int) =
(fun (_x_584 : intlist) ->
Value (fun (_ : intlist) -> _x_584));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_585 ->
Expand Down Expand Up @@ -218,8 +221,10 @@ let _test_leaf_state_422 (_m_423 : int) =
_op_173 (* @ *) _b_458 _b_594));
effect_clauses =
(fun (type a b)
(eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_596 ->
Expand All @@ -235,8 +240,11 @@ let _test_leaf_state_422 (_m_423 : int) =
})
(_l_482 false))));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_495 ->
Expand Down Expand Up @@ -309,8 +317,10 @@ let _test_leaf_state_loop_2631 (_m_2632 : int) =
Value (fun (_ : intlist) -> _x_2843));
effect_clauses =
(fun (type a b)
(eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_2844 ->
Expand Down Expand Up @@ -357,14 +367,16 @@ let _test_leaf_state_loop_2631 (_m_2632 : int) =
_b_2853));
effect_clauses =
(fun (type a b)
(eff :
(a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_2855 ->
Value
(fun (_s_2856 : intlist) ->
(fun (_s_2856 : intlist)
->
match _s_2856 with
| Cons
(_x_2858, _rest_2857)
Expand All @@ -381,8 +393,11 @@ let _test_leaf_state_loop_2631 (_m_2632 : int) =
})
(_l_2703 false))));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect)
: (a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_2753 ->
Expand Down Expand Up @@ -449,8 +464,11 @@ let _test_leaf_state_update_4890 (_m_4891 : int) =
(fun (_x_5109 : intlist) ->
Value (fun (_ : int) -> _x_5109));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_5110 ->
Expand Down Expand Up @@ -495,8 +513,10 @@ let _test_leaf_state_update_4890 (_m_4891 : int) =
_op_173 (* @ *) _b_5443 _b_5445));
effect_clauses =
(fun (type a b)
(eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_5447 ->
Expand All @@ -516,8 +536,11 @@ let _test_leaf_state_update_4890 (_m_4891 : int) =
})
(_l_5442 false))));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect) :
(a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_5453 ->
Expand Down Expand Up @@ -591,8 +614,11 @@ let _test_leaf_state_update_loop_21688 (_m_21689 : int) =
(fun (_x_21958 : intlist) ->
Value (fun (_ : int) -> _x_21958));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect)
: (a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_21959 ->
Expand Down Expand Up @@ -640,9 +666,11 @@ let _test_leaf_state_update_loop_21688 (_m_21689 : int) =
_b_22294));
effect_clauses =
(fun (type a b)
(eff :
(a, b) eff_internal_effect)
: (a -> (b -> _) -> _) ->
(eff :
(a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_22296 ->
Expand All @@ -664,8 +692,11 @@ let _test_leaf_state_update_loop_21688 (_m_21689 : int) =
})
(_l_22291 false))));
effect_clauses =
(fun (type a b) (eff : (a, b) eff_internal_effect)
: (a -> (b -> _) -> _) ->
(fun (type a b)
(eff : (a, b) eff_internal_effect)
:
(a -> (b -> _) -> _)
->
match eff with
| Get ->
fun () _l_22302 ->
Expand Down
Loading
Loading