Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
99a5e610
Commit
99a5e610
authored
Apr 10, 2019
by
Mart Lubbers
Browse files
implement environment show <environment> for cpm
parent
f5f035ba
Pipeline
#20922
passed with stage
in 1 minute and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cpm/CpmLogic.icl
View file @
99a5e610
...
...
@@ -245,11 +245,41 @@ doProjectAction _ _ _ _ world =
*/
doEnvironmentAction
::
String
String
EnvironmentAction
*
World
->
*
World
doEnvironmentAction
cleanhome
pwd
ListEnvironments
world
#
(
envs
,
world
)
=
readIDEEnvs
cleanhome
"IDEEnvs"
world
#
(
envs
,
world
)
=
readIDEEnvs
cleanhome
EnvsFileName
world
=
showLines
[
t
.
target_name
\\
t
<-
envs
]
world
doEnvironmentAction
cleanhome
pwd
(
ImportEnvironment
ef
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
ImportEnvironment
ef
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
RemoveEnvironment
en
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
ShowEnvironment
en
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
ShowEnvironment
en
)
world
#
(
envs
,
world
)
=
readIDEEnvs
cleanhome
EnvsFileName
world
#
match
=
filter
(\
s
->
s
.
target_name
==
en
)
envs
|
isEmpty
match
=
error
(
"Environment "
+++
en
+++
" not found"
)
world
=
showLines
(
printEnvironment
(
hd
match
))
world
where
printEnvironment
e
=
[
"Name: "
+++
e
.
target_name
,
"Paths: "
+++
foldr
(+++)
""
[
"
\t
"
+++
t
+++
"
\n
"
\\
t
<|-
e
.
target_path
]
,
"Dynamics libraries:
\n
"
+++
foldr
(+++)
""
[
"
\t
"
+++
t
+++
"
\n
"
\\
t
<|-
e
.
target_libs
]
,
"Object files:
\n
"
+++
foldr
(+++)
""
[
"
\t
"
+++
t
+++
"
\n
"
\\
t
<|-
e
.
target_objs
]
,
"Static libraries:
\n
"
+++
foldr
(+++)
""
[
"
\t
"
+++
t
+++
"
\n
"
\\
t
<|-
e
.
target_stat
]
,
"Compiler: "
+++
e
.
target_comp
,
"Code generator: "
+++
e
.
target_cgen
,
"ABC optimizer: "
+++
e
.
target_abcopt
,
"Bytecode generator: "
+++
e
.
target_bcgen
,
"Bytecode linker: "
+++
e
.
target_bclink
,
"Bytecode stripper: "
+++
e
.
target_bcstrip
,
"Bytecode prelink: "
+++
e
.
target_bcprelink
,
"Linker: "
+++
e
.
target_link
,
"Dynamic linker: "
+++
e
.
target_dynl
,
"ABC version: "
+++
toString
e
.
target_vers
,
"64 bit processor: "
+++
toString
e
.
env_64_bit_processor
,
"Redirect console: "
+++
toString
e
.
target_redc
,
"Compile method: "
+++
case
e
.
target_meth
of
CompileSync
=
"sync"
CompileAsync
i
=
"async "
+++
toString
i
CompilePers
=
"pers"
,
"Processor: "
+++
toString
e
.
target_proc
]
doEnvironmentAction
cleanhome
pwd
(
ExportEnvironment
en
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
CreateEnvironment
en
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
RenameEnvironment
en
en`
)
world
=
error
(
"Not implemented"
)
world
...
...
Write
Preview
Supports
Markdown
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