Skip to content
Draft
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
3 changes: 3 additions & 0 deletions runtime/src/main/fusion/modules/fusion/base.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ To use this dialect for your module, declare it as follows:
(require "/fusion/private/control")
(provide and or when unless cond)

(require "/fusion/private/raise")
(provide exit)

(require "/fusion/equality")
(provide = == === same ident)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
(provide
'#%top'
apply
exit
if
is_blob
is_bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ to the elements of `sequence`. The `proc` is called in tail position.
(java_new "dev.ionfusion.fusion.ApplyProc"))


(define_values (exit)
'''
(exit)
Exits the running Fusion program.
'''
(java_new "dev.ionfusion.fusion.ExitProc"))


(define_syntax if
'''
(if test then else)
Expand Down
10 changes: 10 additions & 0 deletions runtime/src/main/fusion/modules/fusion/private/raise.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

(provide
assert
exit
raise
raise_argument_error
raise_arity_error
Expand Down Expand Up @@ -88,4 +89,13 @@ Note that a `result_error` IS-A `contract_error`.
'''
(java_new "dev.ionfusion.fusion.RaiseResultErrorProc"))


(define_values (exit)
'''
(exit)

Terminates the current Fusion thread.
'''
(lambda ()
(raise (java_new "dev.ionfusion.fusion.ExitException"))))
)
20 changes: 0 additions & 20 deletions runtime/src/main/java/dev/ionfusion/fusion/ExitProc.java

This file was deleted.

Loading