Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry-packages
curry-repl
Commits
109ed7cb
Commit
109ed7cb
authored
Jul 13, 2022
by
Michael Hanus
Browse files
Add clean main module in case of errors
parent
44ba03f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/REPL/Main.curry
View file @
109ed7cb
...
...
@@ -2,7 +2,7 @@
---
A
universal
REPL
which
can
be
used
on
top
of
a
Curry
compiler
---
---
@
author
Michael
Hanus
---
@
version
Februar
y
2022
---
@
version
Jul
y
2022
------------------------------------------------------------------------------
module
REPL
.
Main
where
...
...
@@ -894,14 +894,15 @@ compileMainExpression rst exp runrmexec = do
where
compileProgExp
=
do
ecg
<-
generateMainExpFile
let
mainexpmod
=
mainExpMod
rst
if
ecg
/=
0
then
return
ecg
then
do
cleanModule
rst
mainexpmod
return
ecg
else
do
when
(
verbose
rst
>
3
)
$
do
putStrLn
"GENERATED MAIN MODULE:"
readFile
(
mainExpFile
rst
)
>>=
putStrLn
let
mainexpmod
=
mainExpMod
rst
compilecmd
=
curryCompilerCommand
(
reduceVerbose
rst
)
++
" "
++
let
compilecmd
=
curryCompilerCommand
(
reduceVerbose
rst
)
++
" "
++
(
ccExecOpt
(
compiler
rst
))
mainexpmod
timecompilecmd
<-
getTimeCmd
rst
"Compilation"
compilecmd
if
ccCurryPath
(
compiler
rst
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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