PmProject.dcl 4.94 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
3
definition module PmProject

import PmTypes
4
from UtilStrictLists import :: List
Diederik van Arkel's avatar
Diederik van Arkel committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import PmFiles
import StdMaybe, StdFile


DclMod :== True
IclMod :== False

:: Def_and_Imp		:== Bool

:: Project

SaveProjectFile	::
	!String			// path to projectfile
	!Project		// the project
	!String			// the application directory
	!*Files			// the filesystem environment
	->
	( !Bool			// success
	, !*Files		// returned filesystem
	);
25

Diederik van Arkel's avatar
Diederik van Arkel committed
26
27
28
29
30
ReadProjectFile	::
	!String			// path to projectfile
	!String			// the application directory
	!*Files			// the filesystem environment
	->
31
	(!(!Project		// the project
Diederik van Arkel's avatar
Diederik van Arkel committed
32
33
34
35
36
37
38
	, !Bool			// success: true if successful except when failed to close
					// project file. Then success is true but errmsg (next entry)
					// is nonempty.
	, !{#Char}		// errmsg: reports the encountered error if any
	),!*Files		// returned filesystem
	)

39
40
save_project_template_file :: !String !Project !String !*Files -> (!Bool, !*Files)

41
//Loads a template file into a (n incomplete) project
42
43
read_project_template_file	:: !String !String !*Files -> (!(!Bool, !Project, !{#Char}),!*Files)

44
45
46
//Creates an actual project from a loaded template
create_new_project_using_template :: !String !String !CompilerOptions !EditWdOptions !Project !*Files -> ((!Bool, !Project), !*Files)

47
48
change_root_directory_of_project :: !{#Char} !{#Char} !Project -> Project

Diederik van Arkel's avatar
Diederik van Arkel committed
49
50
51
52
53
54
55
56
57
58
getDynamicInfo	:: !Project -> (ProjectDynamicInfo,Project)
setDynamicInfo	:: !.ProjectDynamicInfo !.Project -> .Project

//--

PR_InitProject	:: Project
PR_ProjectSet	:: !Project -> Bool
PR_NewProject	:: !String !EditWdOptions !CompilerOptions !CodeGenOptions !ApplicationOptions
					!(List String) !LinkOptions -> Project

59
PR_SetBuilt					:: ![!ModuleDirAndName] !u:Project -> u:Project
Diederik van Arkel's avatar
Diederik van Arkel committed
60
61
PR_ClearDependencies		:: !Project -> Project
PR_SetRoot					:: !String !EditWdOptions !CompilerOptions !Project -> Project
62
PR_SetRelativeRootDir	    :: !String !Project -> Project
Diederik van Arkel's avatar
Diederik van Arkel committed
63
64
65
66
67
68
69
70
71
72
PR_SetCompiled				:: !Modulename !Project -> Project
PR_SetCodeGenerated			:: !Modulename !Project -> Project
PR_SetSysCodeGenerated		:: !Project -> Project
PR_SetLinked				:: !Project -> Project
PR_SetSaved					:: !Project -> Project
PR_SetCodeGenOptions		:: !CodeGenOptions !Project -> Project
PR_SetApplicationOptions	:: !ApplicationOptions !Project -> Project
PR_SetPaths					:: !Bool !(List String) !(List String) !Project -> Project

PR_GetCodeGenOptions		:: !Project -> CodeGenOptions
73
//PR_GetProcessor				:: !Project -> Processor
Diederik van Arkel's avatar
Diederik van Arkel committed
74
75
76
PR_GetApplicationOptions	:: !Project -> ApplicationOptions
PR_GetPaths					:: !Project -> List String
PR_GetRootModuleName		:: !Project -> String
77
78
PR_GetRootPathName			:: !Project -> (!String,!Project)
PR_GetRootModuleDir			:: !Project -> String
79
PR_GetRootModuleDirAndName	:: !Project -> (!ModuleDirAndName,!Project)
80
81
PR_GetRootDir :: !Project -> String
PR_GetRelativeRootDir :: !Project -> String
Diederik van Arkel's avatar
Diederik van Arkel committed
82
PR_GetModulenames			:: !Bool !Def_and_Imp !Project -> (List String,Project)
83
PR_GetDirAndModulenames		:: !Project -> ([!ModuleDirAndName],Project)
Diederik van Arkel's avatar
Diederik van Arkel committed
84
85
86
87
88
89
90
91
92
PR_GetOpenModulenames		:: !Project -> List String
PR_GetModuleStuff			:: !Project -> List (Modulename,String,Modulename,String)

PR_SrcUpToDate				:: !Modulename !Project -> Bool
PR_ABCUpToDate				:: !Modulename !Project -> Bool
PR_SysUptoDate				:: !Project -> Bool
PR_ExecUpToDate				:: !Project -> Bool
PR_Saved					:: !Project -> Bool

93
PR_GetModuleInfo			:: !Modulename !Project -> Maybe ModInfo
Diederik van Arkel's avatar
Diederik van Arkel committed
94

95
96
PR_UpdateModule				:: !Modulename !(ModInfo -> ModInfo) !Project -> Project
PR_UpdateModules			:: ![Modulename] !(ModInfo -> ModInfo) !Project -> Project
Diederik van Arkel's avatar
Diederik van Arkel committed
97
98
99
100

PR_SetLinkOptions			:: !Project !LinkOptions -> Project
PR_GetLinkOptions			:: !Project -> LinkOptions

101
PR_AddABCInfo				:: !ModuleDirAndName !(List LinkObjFileName) !(List LinkLibraryName) !CompilerOptions !Project -> Project
Diederik van Arkel's avatar
Diederik van Arkel committed
102

103
104
// Retrieves the import object files and libraries together with their modules
PR_GetABCLinkInfo			:: !Project -> (!(List (Modulename, LinkObjFileName)), !(List (Modulename, LinkLibraryName)))
Diederik van Arkel's avatar
Diederik van Arkel committed
105

106
PR_GetStaticLibsInfo		:: !Project -> StaticLibInfo
Diederik van Arkel's avatar
Diederik van Arkel committed
107
108
PR_SetStaticLibsInfo		:: !StaticLibInfo !Project -> Project

109
PR_GetTarget				:: !Project -> String
Diederik van Arkel's avatar
Diederik van Arkel committed
110
111
PR_SetTarget				:: !String !Project -> Project

112
113
PR_GetExecPath				:: !Project -> String
PR_SetExecPath				:: !String !Project -> Project
Diederik van Arkel's avatar
Diederik van Arkel committed
114

115
PR_GetByteCodePath			:: !Project -> String
Camil Staps's avatar
Camil Staps committed
116
PR_SetByteCodePath			:: !String !Project -> Project
117

Diederik van Arkel's avatar
Diederik van Arkel committed
118
119
120
121
122
123
124
125
126
127
128
129
130
SL_Add		:: !String !StaticLibInfo -> StaticLibInfo
SL_Rem		:: ![String] !String !String !StaticLibInfo -> StaticLibInfo
SL_Libs		:: !StaticLibInfo -> List String
SL_Dcls		:: !StaticLibInfo -> List String
SL_Deps		:: !StaticLibInfo -> List String
SL_SetLibs	:: !(List String) !StaticLibInfo -> StaticLibInfo
SL_SetDcls	:: !(List String) !StaticLibInfo -> StaticLibInfo
SL_SetDeps	:: !(List String) !StaticLibInfo -> StaticLibInfo

PR_SetPrecompile	:: !(Maybe String) !Project -> Project
PR_GetPrecompile	:: !Project -> (!Maybe String, !Project)
PR_SetPostlink		:: !(Maybe String) !Project -> Project
PR_GetPostlink		:: !Project -> (!Maybe String, !Project)
131
132

make_project_dir :: !Int !{#Char} -> {#Char}