Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
msprotz committed Nov 21, 2024
1 parent 394c472 commit 5382287
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TEST_DIRS = $(filter-out $(BROKEN_TESTS),$(subst test/,,$(shell find test -maxd

.PHONY: all
all: format-check
@ocamlfind list | grep -q charon || test -L lib/charon || echo "⚠️⚠️⚠️ Charon not found; we suggest cd lib && ln -s path/to/charon-ml charon"
@ocamlfind list | grep -q charon || test -L lib/charon || echo "⚠️⚠️⚠️ Charon not found; we suggest cd lib && ln -s path/to/charon charon"
@ocamlfind list | grep -q krml || test -L lib/krml || echo "⚠️⚠️⚠️ krml not found; we suggest cd lib && ln -s path/to/karamel/lib krml"
$(MAKE) build

Expand Down
6 changes: 5 additions & 1 deletion lib/Builtin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ let step_by : K.lident = [ "core"; "iter"; "adapters"; "step_by" ], "StepBy"
let mk_step_by t = K.TApp (step_by, [ t ])
let mk_range_step_by_iterator t = mk_iterator (mk_step_by t)

(* This is incorrect: the function receives e.g.
- Range<usize> as its type argument,
- &StepBy<Range<usize>> for the type of its argument,
then returns Option<usize> for its return value. Which we can't really type. *)
let range_iterator_step_by =
{
name = [ "Eurydice" ], "range_iterator_step_by";
Expand All @@ -125,7 +129,7 @@ let range_step_by_iterator_next =
name = [ "Eurydice" ], "range_step_by_iterator_next";
typ =
Krml.Helpers.fold_arrow
[ TBuf (mk_range_step_by_iterator (TBound 0), false) ]
[ TBuf (mk_step_by (mk_range (TBound 0)), false) ]
(mk_option (TBound 0));
n_type_args = 1;
cg_args = [];
Expand Down

0 comments on commit 5382287

Please sign in to comment.