Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fc1943s committed May 18, 2024
1 parent f8afbd6 commit b054e49
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 382 deletions.
372 changes: 189 additions & 183 deletions apps/spiral/builder/spiral_builder.fsx

Large diffs are not rendered by default.

410 changes: 215 additions & 195 deletions apps/spiral/builder/spiral_builder.rs

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/spiral/am'.dib
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () =
#!spiral

inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () =
!\\((ar, fn), $'"$0.into_iter().for_each(|x| { $1(x); })"')
(!\($'"true; !ar.into_iter().for_each(|x| { //"') : bool) |> ignore
inl x = fn !\($'"x"')
(!\($'"true; !x })"') : bool) |> ignore

#!markdown

Expand Down
4 changes: 3 additions & 1 deletion lib/spiral/am'.spi
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () =

/// ## vec_for_each'
inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () =
!\\((ar, fn), $'"$0.into_iter().for_each(|x| { $1(x); })"')
(!\($'"true; !ar.into_iter().for_each(|x| { //"') : bool) |> ignore
inl x = fn !\($'"x"')
(!\($'"true; !x })"') : bool) |> ignore

/// ## vec_filter
inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t =
Expand Down
2 changes: 1 addition & 1 deletion lib/spiral/runtime.dib
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ let execute_with_options (options : execution_options) : i32 * string =
inl std_trace =
channel_receiver
|> optionm'.box
|> optionm'.map'' fun channel_receiver =>
|> optionm'.map' fun channel_receiver =>
channel_receiver
|> threading.arc_mutex_lock
|> resultm.unwrap'
Expand Down
2 changes: 1 addition & 1 deletion lib/spiral/runtime.spi
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ let execute_with_options (options : execution_options) : i32 * string =
inl std_trace =
channel_receiver
|> optionm'.box
|> optionm'.map'' fun channel_receiver =>
|> optionm'.map' fun channel_receiver =>
channel_receiver
|> threading.arc_mutex_lock
|> resultm.unwrap'
Expand Down

0 comments on commit b054e49

Please sign in to comment.