aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)