Commit 1042ca9c authored by Jurrien Stutterheim's avatar Jurrien Stutterheim

Refactor startParse

parent c20eebd2
......@@ -15,7 +15,7 @@ import PmDriver
import PmEnvironment
import PmProject
import set_return_code
import StdBool, StdEnum, StdFile, StdFunc, StdMisc
import StdBool, StdEnum, StdFile, StdFunc, StdMisc, StdTuple
import Text
import UtilIO
import UtilStrictLists
......@@ -108,9 +108,7 @@ Start world
= doCpmAction ch pwd cpm world
startParse :: [.Char] -> CpmAction
startParse args = case filter (\(xs, _) -> xs == []) (begin pCpm args) of
[(_, as):_] -> as
_ -> CpmHelp
startParse args = maybe CpmHelp snd (find (null o fst) (begin pCpm args))
doCpmAction :: String String .CpmAction *World -> .World
doCpmAction cleanhome pwd (Project pn pa) world = doProjectAction cleanhome pwd pn pa world
......@@ -216,7 +214,6 @@ doModPaths cleanhome pn project f world
where paths = PR_GetPaths project
prj = PR_SetPaths False paths (f paths) project
openProject :: !FilePath !FilePath !*World -> (!MaybeErrorString Project,!*World)
openProject cleanhome projectfile world
# ((prj, ok, err), world) = accFiles (ReadProjectFile projectfile cleanhome) 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