Commit d1cd0a12 authored by John van Groningen's avatar John van Groningen

remove imports from ObjectIO

parent 4036a29a
module BatchBuild
import StdEnv, StdIO
import StdEnv
import ArgEnv
import PmDriver
import PmProject
import IdeState
import UtilIO
from UtilIO import GetFullApplicationPath,GetLongPathName
import PmEnvironment, logfile, set_return_code
from Platform import application_path
Start world
# (startup,world) = accFiles GetFullApplicationPath world
# envspath = applicationpath EnvsFileName
# envspath = application_path EnvsFileName
# (envs,world) = openEnvironments startup envspath world
// | not ok = wAbort ("Unable to read environments\n") world
| not path_ok = wAbort ("BatchBuild\nUse as: 'BatchBuild projectname.prj'\n") world
......@@ -18,11 +19,10 @@ Start world
| not ok || err <> "" = wAbort ("BatchBuild failed while opening project: "+++.err+++."\n") world
# (ok,logfile,world) = openLogfile proj_path world
| not ok = wAbort ("BatchBuild failed while opening logfile.\n") world
# (id1,world) = openId world
# (id2,world) = openId world
# iniGeneral = initGeneral True default_compiler_options startup proj_path proj envs logfile id1 id2
#! world = startIO NDI iniGeneral pinit [ProcessClose closeProcess] world
= finish world
# iniGeneral = initGeneral True default_compiler_options startup proj_path proj envs logfile
# ps = {ls=iniGeneral,gst_world=world,gst_continue_or_stop=False}
# {ls,gst_world} = pinit ps
= finish gst_world
where
commandline = getCommandLine
args = [arg \\ arg <-: commandline]
......
definition module IdeState
import StdPSt, StdId, StdPictureDef
import StdPathname
import UtilStrictLists
from PmAbcMagic import :: ABCCache
......@@ -13,14 +12,22 @@ from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
:: *General
initGeneral :: !Bool !CompilerOptions !String !String !Project ![Target] !*File !Id !Id -> *General
:: *GeneralSt = {
ls :: !General,
gst_world :: !*World,
gst_continue_or_stop :: !Bool
}
app_world_instead_of_ps f gst :== {gst & gst_world=f gst.gst_world}
instance FileSystem GeneralSt
instance FileEnv GeneralSt
instance Typer General
initGeneral :: !Bool !CompilerOptions !String !String !Project ![Target] !*File -> *General
:: Prefs =
{ be_verbose :: !Bool
, compopts :: !CompilerOptions
, edwinfont :: !FontDef
, edwintabs :: !(Int,Bool,Bool,Bool,Bool)
, number_of_processes :: !Int
}
......@@ -29,50 +36,48 @@ instance Typer General
:: SrcPrefs
:: NewlinePrefs
getPrefs :: !*(PSt *General) -> (Prefs,*PSt *General)
setPrefs :: Prefs !*(PSt *General) -> *PSt *General
getProject :: !*(PSt *General) -> (Project,*PSt *General)
setProject :: !Project !*(PSt *General) -> *PSt *General
getABCCache :: !*(PSt *General) -> *(!*ABCCache,!*PSt *General)
setABCCache :: !*ABCCache !*(PSt *General) -> *PSt *General
getFICache :: !*(PSt *General) -> (FileInfoCache,*PSt *General)
setFICache :: !FileInfoCache !*(PSt *General) -> *PSt *General
getPath :: !*(PSt *General) -> (!Pathname,!*PSt *General)
setPath :: !Pathname !*(PSt *General) -> !*PSt *General
getStup :: !*(PSt *General) -> (!Pathname,!*PSt *General)
getInterrupt :: !*(PSt *General) -> (!(Id,Id),!*PSt *General)
//getKeyMapping
getTargets :: !*(PSt *General) -> (![Target],!*PSt *General)
setTargets :: ![Target] !*(PSt *General) -> !*PSt *General
getCurrentTarget :: !*(PSt *General) -> (!Int,!*PSt *General)
setCurrentTarget :: !Int !*(PSt *General) -> !*PSt *General
getCurrentPaths :: !*(PSt *General) -> (!(List Pathname),!*PSt *General)
getCurrentDlibs :: !*(PSt *General) -> (!(List String),!*PSt *General)
getCurrentSlibs :: !*(PSt *General) -> (!(List String),!*PSt *General)
getCurrentObjts :: !*(PSt *General) -> (!(List String),!*PSt *General)
getCurrentComp :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentCgen :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentLink :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentDynl :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentVers :: !*(PSt *General) -> (!Int,!*PSt *General)
getCurrent64BitProcessor :: !*(PSt *General) -> (!Bool,!*PSt *General)
getCurrentProc :: !*(PSt *General) -> (!Processor,!*PSt *General)
getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General)
getCompilerProcessIds :: !*(PSt *General) -> (!CompilerProcessIds,!*(PSt *General))
setCompilerProcessIds :: !CompilerProcessIds !*(PSt *General) -> *(PSt *General)
getPrefs :: !*GeneralSt -> (Prefs,*GeneralSt)
setPrefs :: Prefs !*GeneralSt -> *GeneralSt
getProject :: !*GeneralSt -> (Project,*GeneralSt)
setProject :: !Project !*GeneralSt -> *GeneralSt
getABCCache :: !*GeneralSt -> *(!*ABCCache,!*GeneralSt)
setABCCache :: !*ABCCache !*GeneralSt -> *GeneralSt
getFICache :: !*GeneralSt -> (FileInfoCache,*GeneralSt)
setFICache :: !FileInfoCache !*GeneralSt -> *GeneralSt
getPath :: !*GeneralSt -> (!Pathname,!*GeneralSt)
setPath :: !Pathname !*GeneralSt -> !*GeneralSt
getStup :: !*GeneralSt -> (!Pathname,!*GeneralSt)
getTargets :: !*GeneralSt -> (![Target],!*GeneralSt)
setTargets :: ![Target] !*GeneralSt -> !*GeneralSt
getCurrentTarget :: !*GeneralSt -> (!Int,!*GeneralSt)
setCurrentTarget :: !Int !*GeneralSt -> !*GeneralSt
getCurrentPaths :: !*GeneralSt -> (!(List Pathname),!*GeneralSt)
getCurrentDlibs :: !*GeneralSt -> (!(List String),!*GeneralSt)
getCurrentSlibs :: !*GeneralSt -> (!(List String),!*GeneralSt)
getCurrentObjts :: !*GeneralSt -> (!(List String),!*GeneralSt)
getCurrentComp :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentCgen :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentLink :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentDynl :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentVers :: !*GeneralSt -> (!Int,!*GeneralSt)
getCurrent64BitProcessor :: !*GeneralSt -> (!Bool,!*GeneralSt)
getCurrentProc :: !*GeneralSt -> (!Processor,!*GeneralSt)
getCurrentMeth :: !*GeneralSt -> (!CompileMethod,!*GeneralSt)
getCompilerProcessIds :: !*GeneralSt -> (!CompilerProcessIds,!*GeneralSt)
setCompilerProcessIds :: !CompilerProcessIds !*GeneralSt -> *GeneralSt
//-- boolean that indicates if user interaction is allowed
getInteract :: !*(PSt *General) -> (!Bool,!*PSt *General)
getInteract :: !*GeneralSt -> (!Bool,!*GeneralSt)
//-- log functions for batch build
writeLog :: !String !*(PSt *General) -> !*PSt *General
abortLog :: !Bool !String !*(PSt *General) -> !*PSt *General
writeLog :: !String !*GeneralSt -> *GeneralSt
abortLog :: !Bool !String !*GeneralSt -> *GeneralSt
implementation module IdeState
import StdPSt, StdId, StdPictureDef, StdMisc, StdList, StdProcess, StdPStClass
import StdMisc, StdList
import StdPathname
import UtilStrictLists
from PmAbcMagic import :: ABCCache, AC_Init
......@@ -13,6 +13,39 @@ import set_return_code
import PmFileInfo
from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
appPLoc f gst
# s = f gst.ls
:== {gst & ls=s}
accPLoc f gst
# (r,s) = f gst.ls
:== (r,{gst & ls=s})
instance FileSystem GeneralSt where
fopen fName fMode pState
# (b,f,w) = fopen fName fMode pState.gst_world
# pState = {pState & gst_world=w}
= (b,f,pState)
fclose file pState
# (b,w) = fclose file pState.gst_world
# pState = {pState & gst_world=w}
= (b,pState)
stdio pState
# (f,w) = stdio pState.gst_world
# pState = {pState & gst_world=w}
= (f,pState)
sfopen fName fMode pState
# (b,f,w) = sfopen fName fMode pState.gst_world
# pState = {pState & gst_world=w}
= (b,f,pState)
instance FileEnv GeneralSt where
accFiles accfun io
# (x,w) = accFiles accfun io.gst_world
= (x,{io & gst_world=w})
appFiles appfun io
= {io & gst_world = appFiles appfun io.gst_world}
:: *General =
{ prefs :: !Prefs
, project :: !Project
......@@ -24,11 +57,10 @@ from PmCleanSystem import ::CompilerProcessIds,NoCompilerProcessIds
, pm_targets :: ![Target]
, pm_curtarg :: !Int
, logfile :: !*File
, int_ids :: !(!Id,!Id)
}
initGeneral :: !Bool !CompilerOptions !String !String !Project ![Target] !*File !Id !Id-> *General
initGeneral be_verb comp_opts application_path project_path project targets logfile id1 id2
initGeneral :: !Bool !CompilerOptions !String !String !Project ![Target] !*File -> *General
initGeneral be_verb comp_opts application_path project_path project targets logfile
| isNothing target_index = abort ("Unable to find project environment in available environments.\n")
=
{ prefs = prefs
......@@ -41,13 +73,11 @@ initGeneral be_verb comp_opts application_path project_path project targets logf
, pm_targets = targets
, pm_curtarg = fromJust target_index
, logfile = logfile
, int_ids = (id1,id2)
}
where
prefs =
{ be_verbose = be_verb
, compopts = comp_opts
, edwinfont = NonProportionalFontDef
, edwintabs = (4,True,False,True,True)
, number_of_processes = 1
}
......@@ -58,16 +88,10 @@ where
findIndex x name [t=:{target_name=n}:ns]
| n == name = Just x
= findIndex (inc x) name ns
instance Typer General
where
getTypeWinInfo gen = (dummy_twi,gen)
setTypeWinInfo twi gen = gen
:: Prefs =
{ be_verbose :: !Bool
, compopts :: !CompilerOptions
, edwinfont :: !FontDef
, edwintabs :: !(Int,Bool,Bool,Bool,Bool) // tabsize, autotab, showtabs, showlinenos, showsyncol
, number_of_processes :: !Int
}
......@@ -76,131 +100,128 @@ where
:: SrcPrefs = SrcPrefs
:: NewlinePrefs = NwlPrefs
getPrefs :: !*(PSt *General) -> (Prefs,*PSt *General)
getPrefs :: !*GeneralSt -> (Prefs,*GeneralSt)
getPrefs ps = ps!ls.prefs
setPrefs :: Prefs !*(PSt *General) -> *PSt *General
setPrefs :: Prefs !*GeneralSt -> *GeneralSt
setPrefs prefs ps = {ps & ls.prefs = prefs}
getProject :: !*(PSt *General) -> (Project,*PSt *General)
getProject :: !*GeneralSt -> (Project,*GeneralSt)
getProject ps = ps!ls.project
setProject :: !Project !*(PSt *General) -> *PSt *General
setProject :: !Project !*GeneralSt -> *GeneralSt
setProject project ps = {ps & ls.project = project}
getABCCache :: !*(PSt *General) -> *(!*ABCCache,!*PSt *General)
getABCCache :: !*GeneralSt -> *(!*ABCCache,!*GeneralSt)
getABCCache ps = accPLoc (\p=:{cache = Just cache}->(cache,{p & cache = Nothing})) ps
setABCCache :: !*ABCCache !*(PSt *General) -> *PSt *General
setABCCache :: !*ABCCache !*GeneralSt -> *GeneralSt
setABCCache cache ps = {ps & ls.cache = Just cache}
getFICache :: !*(PSt *General) -> (FileInfoCache,*PSt *General)
getFICache :: !*GeneralSt -> (FileInfoCache,*GeneralSt)
getFICache ps = accPLoc (\p=:{fi_cache = Just fi_cache}->(fi_cache,{p & fi_cache = Nothing})) ps
setFICache :: !FileInfoCache !*(PSt *General) -> *PSt *General
setFICache :: !FileInfoCache !*GeneralSt -> *GeneralSt
setFICache ac ps = appPLoc (\p->{p & fi_cache = Just ac}) ps
getPath :: !*(PSt *General) -> (!Pathname,!*PSt *General)
getPath :: !*GeneralSt -> (!Pathname,!*GeneralSt)
getPath ps = ps!ls.pr_path
setPath :: !Pathname !*(PSt *General) -> !*PSt *General
setPath :: !Pathname !*GeneralSt -> !*GeneralSt
setPath path ps = {ps & ls.pr_path = path}
getStup :: !*(PSt *General) -> (!Pathname,!*PSt *General)
getStup :: !*GeneralSt -> (!Pathname,!*GeneralSt)
getStup ps = ps!ls.stup
//-- NOT YET IMPLEMENTED....
getInterrupt :: !*(PSt *General) -> (!(Id,Id),!*PSt *General)
getInterrupt ps = accPLoc (\p=:{int_ids}->(int_ids,p)) ps
getTargets :: !*(PSt *General) -> (![Target],!*PSt *General)
getTargets :: !*GeneralSt -> (![Target],!*GeneralSt)
getTargets ps = accPLoc (\p=:{pm_targets}->(pm_targets,p)) ps
setTargets :: ![Target] !*(PSt *General) -> !*PSt *General
setTargets :: ![Target] !*GeneralSt -> !*GeneralSt
setTargets ts ps = appPLoc (\p->{p & pm_targets = ts}) ps
getCurrentTarget :: !*(PSt *General) -> (!Int,!*PSt *General)
getCurrentTarget :: !*GeneralSt -> (!Int,!*GeneralSt)
getCurrentTarget ps = accPLoc (\p=:{pm_curtarg}->(pm_curtarg,p)) ps
setCurrentTarget :: !Int !*(PSt *General) -> !*PSt *General
setCurrentTarget :: !Int !*GeneralSt -> !*GeneralSt
setCurrentTarget tg ps
= appPLoc (\p->{p & pm_curtarg = tg}) ps
getCurrentPaths :: !*(PSt *General) -> (!(List Pathname),!*PSt *General)
getCurrentPaths :: !*GeneralSt -> (!(List Pathname),!*GeneralSt)
getCurrentPaths ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_path,ps)
getCurrentDlibs :: !*(PSt *General) -> (!(List String),!*PSt *General)
getCurrentDlibs :: !*GeneralSt -> (!(List String),!*GeneralSt)
getCurrentDlibs ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_libs,ps)
getCurrentSlibs :: !*(PSt *General) -> (!(List String),!*PSt *General)
getCurrentSlibs :: !*GeneralSt -> (!(List String),!*GeneralSt)
getCurrentSlibs ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_stat,ps)
getCurrentObjts :: !*(PSt *General) -> (!(List String),!*PSt *General)
getCurrentObjts :: !*GeneralSt -> (!(List String),!*GeneralSt)
getCurrentObjts ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_objs,ps)
getCurrentComp :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentComp :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentComp ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_comp,ps)
getCurrentCgen :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentCgen :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentCgen ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_cgen,ps)
getCurrentLink :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentLink :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentLink ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_link,ps)
getCurrentDynl :: !*(PSt *General) -> (!String,!*PSt *General)
getCurrentDynl :: !*GeneralSt -> (!String,!*GeneralSt)
getCurrentDynl ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_dynl,ps)
getCurrentVers :: !*(PSt *General) -> (!Int,!*PSt *General)
getCurrentVers :: !*GeneralSt -> (!Int,!*GeneralSt)
getCurrentVers ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_vers,ps)
getCurrent64BitProcessor :: !*(PSt *General) -> (!Bool,!*PSt *General)
getCurrent64BitProcessor :: !*GeneralSt -> (!Bool,!*GeneralSt)
getCurrent64BitProcessor ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.env_64_bit_processor,ps)
getCurrentProc :: !*(PSt *General) -> (!Processor,!*PSt *General)
getCurrentProc :: !*GeneralSt -> (!Processor,!*GeneralSt)
getCurrentProc ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_proc,ps)
getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General)
getCurrentMeth :: !*GeneralSt -> (!CompileMethod,!*GeneralSt)
getCurrentMeth ps
# (ct,ps) = accPLoc (\p=:{pm_targets,pm_curtarg}->(pm_targets!!pm_curtarg,p)) ps
= (ct.target_meth,ps)
getCompilerProcessIds :: !*(PSt *General) -> (!CompilerProcessIds,!*(PSt *General))
getCompilerProcessIds :: !*GeneralSt -> (!CompilerProcessIds,!*GeneralSt)
getCompilerProcessIds ps = accPLoc (\l -> l!g_compiler_process_ids) ps
setCompilerProcessIds :: !CompilerProcessIds !*(PSt *General) -> *(PSt *General)
setCompilerProcessIds :: !CompilerProcessIds !*GeneralSt -> *GeneralSt
setCompilerProcessIds compiler_project_ids ps = appPLoc (\l -> {l & g_compiler_process_ids = compiler_project_ids}) ps
getInteract :: !*(PSt *General) -> (!Bool,!*PSt *General)
getInteract :: !*GeneralSt -> (!Bool,!*GeneralSt)
getInteract ps = (False,ps)
writeLog :: !String !*(PSt *General) -> !*PSt *General
writeLog :: !String !*GeneralSt -> *GeneralSt
writeLog message ps
= appPLoc (\ls=:{logfile} -> {ls & logfile = writeLogfile message logfile}) ps
abortLog :: !Bool !String !*(PSt *General) -> !*PSt *General
abortLog :: !Bool !String !*GeneralSt -> *GeneralSt
abortLog flag message ps
# ps = case message of
"" -> ps
......@@ -209,7 +230,6 @@ abortLog flag message ps
# (ok,ps) = closeLogfile lf ps
// | not ok ...
# ps = case flag of
True -> set_return_code_pst (-1) ps
True -> app_world_instead_of_ps (set_return_code_world (-1)) ps
_ -> ps
= closeProcess ps
= {ps & gst_continue_or_stop=True}
definition module PmCallBack
from StdFile import class FileSystem,class FileEnv
from IdeState import ::GeneralSt,instance FileSystem GeneralSt,instance FileEnv GeneralSt
start :: !.a !(.Bool -> .(.a -> .(*GeneralSt -> *(.a,*GeneralSt)))) !*GeneralSt -> *GeneralSt
cont :: !*(!.a,!*GeneralSt) -> *(.a,!*GeneralSt);
stop :: !*(.a,!*GeneralSt) -> *(.a,!*GeneralSt);
implementation module PmCallBack
import StdBool
from IdeState import ::GeneralSt{..},::General
start :: !.a !(.Bool -> .(.a -> .(*GeneralSt -> *(.a,*GeneralSt)))) !*GeneralSt -> *GeneralSt
start ini_step step ps
# (ls,ps) = step False ini_step ps
| not ps.gst_continue_or_stop
= start ls step ps
= {ps & gst_continue_or_stop=False}
cont :: !*(!.a,!*GeneralSt) -> *(.a,!*GeneralSt);
cont (ls,ps)
= (ls,ps)
stop :: !*(.a,!*GeneralSt) -> *(.a,!*GeneralSt);
stop (ls,ps)
= (ls,{ps & gst_continue_or_stop=True})
definition module PmDialogues
import StdPSt, StdPathname, UtilStrictLists
import StdPathname, UtilStrictLists
doPathsDialog :: !String !Pathname !Pathname (!List Pathname) ((!List Pathname) (PSt .l) -> (PSt .l)) (PSt .l) -> (PSt .l)
doPathsDialog :: !String !Pathname !Pathname !(List Pathname) ((List Pathname) .state -> .state) .state -> .state
implementation module PmDialogues
import StdPSt, StdPathname, UtilStrictLists
import StdPathname, UtilStrictLists
doPathsDialog :: !String !Pathname !Pathname (!List Pathname) ((!List Pathname) (PSt .l) -> (PSt .l)) (PSt .l) -> (PSt .l)
doPathsDialog :: !String !Pathname !Pathname !(List Pathname) ((List Pathname) .state -> .state) .state -> .state
doPathsDialog _ _ _ _ f ps = ps
......@@ -2,7 +2,6 @@ definition module errwin
import StdString
import StdPSt, IdeState
import IdeState
updateErrorWindow :: !([String]) !*(PSt *General) -> *PSt *General;
ew_safe_close :: !*(PSt *General) -> *PSt *General
updateErrorWindow :: ![String] !*GeneralSt -> *GeneralSt;
implementation module errwin
import StdString, StdList, StdFunc
import StdPSt, IdeState
import IdeState
updateErrorWindow :: !([String]) !*(PSt *General) -> *PSt *General;
updateErrorWindow :: ![String] !*GeneralSt -> *GeneralSt;
updateErrorWindow s ps = seq (map writeLog s) ps
ew_safe_close :: !*(PSt *General) -> *PSt *General
ew_safe_close ps = ps
definition module messwin
import StdString, StdPSt
from IdeState import :: General
import StdString
from IdeState import :: GeneralSt,::General, writeLog
:: InfoMessage
= Level1 String
| Level2 String
| Level3 [String]
showInfo :: !.InfoMessage !*(PSt General) -> !*PSt General
closeInfo :: !*(PSt General) -> !*PSt General
showInfo :: !.InfoMessage !*GeneralSt -> *GeneralSt
closeInfo :: !*GeneralSt -> *GeneralSt
implementation module messwin
import StdString, StdPSt, StdBool, StdList, StdFunc
from IdeState import :: General, writeLog
import StdString, StdBool, StdList, StdFunc
from IdeState import :: GeneralSt,::General,writeLog
:: InfoMessage
= Level1 String
| Level2 String
| Level3 [String]
showInfo :: !.InfoMessage !*(PSt General) -> !*PSt General
showInfo :: !.InfoMessage !*GeneralSt -> !*GeneralSt
showInfo info ps
= case info of
(Level1 s) -> writeLog s ps
(Level2 s) -> writeLog s ps
(Level3 s) -> seq (map writeLog s) ps
closeInfo :: !*(PSt General) -> !*PSt General
closeInfo :: !*GeneralSt -> !*GeneralSt
closeInfo ps
= ps
definition module projwin
import StdPSt, IdeState
pm_update_project_window :: !*(PSt *General) -> *PSt *General
pm_update_project_window :: !*state -> *state
implementation module projwin
import StdPSt, IdeState
pm_update_project_window :: !*(PSt *General) -> *PSt *General
pm_update_project_window :: !*state -> *state
pm_update_project_window ps = ps
definition module typeatt
import typewin
update_type_window :: !Bool !String ![String] !*state -> *state
implementation module typeatt
update_type_window :: !Bool !String ![String] !*state -> *state
update_type_window _ _ _ ps = ps
definition module typewin
import StdString
import StdWindowDef
import StdPSt
//import IdeState
updateTypeWindow :: !Bool !String [Int] ![String] !*(PSt *b) -> *PSt *b | Typer b
tw_safe_close :: !*(PSt *b) -> *PSt *b | Typer b
class Typer env
where
getTypeWinInfo :: !*env -> *(!TypeWinInfo, !*env)
setTypeWinInfo :: !TypeWinInfo !*env -> *env
:: TypeWinInfo
dummy_twi :: TypeWinInfo
typeWinKeyboard :: Int
typeWinMouse :: Int
implementation module typewin
import StdString
import StdWindowDef
import StdPSt
//import IdeState
updateTypeWindow :: !Bool !String [Int] ![String] !*(PSt *b) -> *PSt *b | Typer b
updateTypeWindow _ _ _ _ ps = ps
tw_safe_close :: !*(PSt *b) -> *PSt *b | Typer b
tw_safe_close ps = ps
class Typer env
where
getTypeWinInfo :: !*env -> *(!TypeWinInfo, !*env)
setTypeWinInfo :: !TypeWinInfo !*env -> *env
:: TypeWinInfo = TWI
dummy_twi :: TypeWinInfo
dummy_twi = TWI
typeWinKeyboard :: Int
typeWinKeyboard = 42
typeWinMouse :: Int
typeWinMouse = 7
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment