We are planning to upgrade GitLab to the latest version this Friday morning. Expect some downtime!

Commit 99a5e610 authored by Mart Lubbers's avatar Mart Lubbers

implement environment show <environment> for cpm

parent f5f035ba
Pipeline #20922 passed with stage
in 1 minute and 2 seconds
......@@ -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
......
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