Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
823d7536
Commit
823d7536
authored
Jun 01, 2001
by
John van Groningen
Browse files
compiler without IO 0.8
parent
ac8fa7b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
main/CleanCocl.icl
View file @
823d7536
module
CleanCocl
module
CleanCocl
;
import
StdEnv
import
StdEnv
;
from
compilerSwitches
import
SwitchFusion
;
import
cache_variable
;
f
=
SwitchFusion
fusion_is_on
0
;
import
CoclSystemDependent
,
Clean2AppleEventHandler
;
from
events
import
KeyDownEvent
,
HighLevelEvent
,
GetNextEvent
,
WaitNextEvent
,
Toolbox
,
RgnHandle
;
DeviceMask
:==
-31361
;
// HighLevelEventMask+UpdateMask+ActivMask+KeyboardMask+MouseMask+OsMask+1
Start
world
|
install_apple_event_handlers
==
0
&&
store_state
empty_cache
<>
0
=
event_loop
world
;
=
world
;
{}{
event_loop
world
// # (b,what,message,when,position1,position2,modifiers,tb) = GetNextEvent DeviceMask 0;
#
(
b
,
what
,
message
,
when
,
position1
,
position2
,
modifiers
,
tb
)
=
WaitNextEvent
(
-1
)
/*DeviceMask*/
(
-1
)
0
0
;
|
what
==
KeyDownEvent
=
world
;
|
what
==
HighLevelEvent
#
event
=
(
b
,
what
,
message
,
when
,
position1
,
position2
,
modifiers
);
#
((
ok
,
quit
),
world
)
=
accFiles
handle_apple_event
world
;
with
{
handle_apple_event
::
!*
Files
->
(!(!
Bool
,!
Bool
),!*
Files
);
handle_apple_event
files
#
(
ok
,
quit
,
files
)
=
HandleAppleEvent
event
script_handler
files
;
=
((
ok
,
quit
),
files
);
}
|
quit
=
world
;
=
event_loop
world
;
=
event_loop
world
;
}
/*
import deltaEventIO, deltaIOState
import CoclSystemDependent
...
...
@@ -22,3 +60,4 @@ Start world
Quit :: *s (IOState *s) -> (*s, IOState *s)
Quit s io
= (s, QuitIO io)
*/
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment