aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorronny2001-11-02 06:51:15 +0000
committerronny2001-11-02 06:51:15 +0000
commitfdf91fe56dee242807a8827a3a4a41dbe0e4ca16 (patch)
tree6b3de79c2c65b65aff604118e74667dab4ad07b0 /main
parentfix bug fix: no it also compiles (diff)
removed useless version check for coclmain (coclmain is not in a separate libarary)
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@880 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'main')
-rw-r--r--main/coclmain.dcl20
-rw-r--r--main/coclmain.icl48
2 files changed, 3 insertions, 65 deletions
diff --git a/main/coclmain.dcl b/main/coclmain.dcl
index f0a9254..fafabb6 100644
--- a/main/coclmain.dcl
+++ b/main/coclmain.dcl
@@ -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
diff --git a/main/coclmain.icl b/main/coclmain.icl
index c6f35ce..58d9e14 100644
--- a/main/coclmain.icl
+++ b/main/coclmain.icl
@@ -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)