Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
clean-compiler-and-rts
compiler
Commits
c1af8608
Commit
c1af8608
authored
Nov 02, 2001
by
Ronny Wichers Schreur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed useless version check for coclmain (coclmain is not in a separate libarary)
parent
eccbe14b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
65 deletions
+3
-65
main/coclmain.dcl
main/coclmain.dcl
+1
-19
main/coclmain.icl
main/coclmain.icl
+2
-46
No files found.
main/coclmain.dcl
View file @
c1af8608
...
...
@@ -16,25 +16,7 @@ definition module coclmain
uses
StdEnv
compiler
This library is compiled with profiling code. This means that profiling
should also be enabled in projects that use the coclmain library.
Note: The interface from coclmain to the compiler is not version checked.
It's safest to build and use a new coclmain library whenever the
type of the compiler's syntax tree changes.
*/
//
coclMain :: ![{#Char}] !*World -> *World
coclMain
::
![{#
Char
}]
!*
World
->
*
World
// testArgs world
coclMain
:==
coclMainWithVersionCheck
CoclMainVersionCurrent
CoclMainVersionLatestDef
CoclMainVersionLatestImp
CoclMainVersionCurrent
:==
0x02000205
CoclMainVersionLatestDef
:==
0x02000205
CoclMainVersionLatestImp
:==
0x02000205
coclMainWithVersionCheck
::
!
Int
!
Int
!
Int
![{#
Char
}]
!*
World
->
*
World
// currentVersion latestDefVersion latestImpVersion testArgs world
main/coclmain.icl
View file @
c1af8608
...
...
@@ -3,59 +3,15 @@
*/
implementation
module
coclmain
CoclMainVersion
:==
0
import
StdEnv
import
ArgEnv
import
Version
import
set_return_code
import
compile
// coclMain :: ![{#Char}] !*World -> *World
// testArgs world
coclMain
:==
coclMainWithVersionCheck
CoclMainVersionCurrent
CoclMainVersionLatestDef
CoclMainVersionLatestImp
CoclMainVersionCurrent
:==
0x02000205
CoclMainVersionLatestDef
:==
0x02000205
CoclMainVersionLatestImp
:==
0x02000205
checkVersion
::
VersionsCompatability
*
File
->
(!
Bool
,
!*
File
)
checkVersion
VersionsAreCompatible
errorFile
=
(
True
,
errorFile
)
checkVersion
VersionObservedIsTooNew
errorFile
#
errorFile
=
fwrites
"[Coclmain] the library is too new
\n
"
errorFile
=
(
False
,
errorFile
)
checkVersion
VersionObservedIsTooOld
errorFile
#
errorFile
=
fwrites
"[Coclmain] the library is too old
\n
"
errorFile
=
(
False
,
errorFile
)
coclMainWithVersionCheck
::
!
Int
!
Int
!
Int
![{#
Char
}]
!*
World
->
*
World
coclMain
::
![{#
Char
}]
!*
World
->
*
World
// currentVersion latestDefVersion latestImpVersion testArgs world
coclMainWithVersionCheck
currentVersion
latestDefVersion
latestImpVersion
testArgs
world
#
observedVersion
=
{
versionCurrent
=
CoclMainVersionCurrent
,
versionOldestDefinition
=
CoclMainVersionLatestDef
,
versionOldestImplementation
=
CoclMainVersionLatestImp
}
expectedVersion
=
{
versionCurrent
=
currentVersion
,
versionOldestDefinition
=
latestDefVersion
,
versionOldestImplementation
=
latestImpVersion
}
|
not
(
fst
(
checkVersion
(
versionCompare
expectedVersion
observedVersion
)
stderr
))
=
set_return_code
(
-1
)
world
coclMain
testArgs
world
#
(
commandArgs
,
world
)
=
getCommandArgs
(
tl
[
arg
\\
arg
<-:
getCommandLine
])
testArgs
world
#
(
success
,
world
)
...
...
Write
Preview
Markdown
is supported
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