diff --git a/Ide/projwin.icl b/Ide/projwin.icl index 338dac9e32c5542da0974ab6cf507bd2eb17dccb..d46101cb2da32c1b93ad97964fb487626ff657a5 100644 --- a/Ide/projwin.icl +++ b/Ide/projwin.icl @@ -538,16 +538,63 @@ where = makenice u s r where f mod = if shift - (OpenModule (MakeDefPathname mod) emptySelection) - (OpenModule (MakeImpPathname mod) emptySelection) + (open_def mod) //(OpenModule (MakeDefPathname mod) emptySelection) + (open_imp mod) //(OpenModule (MakeImpPathname mod) emptySelection) f` mod = if shift - (OpenModule (MakeImpPathname mod) emptySelection) - (OpenModule (MakeDefPathname mod) emptySelection) + (open_imp mod) //(OpenModule (MakeImpPathname mod) emptySelection) + (open_def mod) //(OpenModule (MakeDefPathname mod) emptySelection) isUnfoldedDir d Nil = False isUnfoldedDir d ((u,d`):!ds) | d == d` = u = isUnfoldedDir d ds + +open_def mod ps + # defpath = MakeDefPathname mod +// # (exists,ps) = accFiles (FExists defpath) ps + # (exists,ps) = exists_module defpath ps + | exists + = OpenModule defpath emptySelection ps + # lhspath = RemoveSuffix mod +++ ".lhs" +// # (exists,ps) = accFiles (FExists lhspath) ps + # (exists,ps) = exists_module lhspath ps + | exists + = OpenModule lhspath emptySelection ps + # hspath = RemoveSuffix mod +++ ".hs" +// # (exists,ps) = accFiles (FExists hspath) ps + # (exists,ps) = exists_module hspath ps + | exists + = OpenModule hspath emptySelection ps + = OpenModule defpath emptySelection ps +open_imp mod ps + # defpath = MakeImpPathname mod +// # (exists,ps) = accFiles (FExists defpath) ps + # (exists,ps) = exists_module defpath ps + | exists + = OpenModule defpath emptySelection ps + # lhspath = RemoveSuffix mod +++ ".lhs" +// # (exists,ps) = accFiles (FExists lhspath) ps + # (exists,ps) = exists_module lhspath ps + | exists + = OpenModule lhspath emptySelection ps + # hspath = RemoveSuffix mod +++ ".hs" +// # (exists,ps) = accFiles (FExists hspath) ps + # (exists,ps) = exists_module hspath ps + | exists + = OpenModule hspath emptySelection ps + = OpenModule defpath emptySelection ps + +exists_module pathname ps + # (syspaths,ps) = getCurrentPaths ps + # (prj,ps) = getProject ps + # prjpaths = PR_GetPaths prj + # srcpaths = AppendLists prjpaths syspaths + # srcpaths = case IsABCPathname pathname of + True -> Map MakeSystemPathname srcpaths + _ -> srcpaths + # ((ok,fullpath),ps) = accFiles (SearchDisk False pathname srcpaths) ps + = (ok,ps) + // pm_set: set main module pm_set :: !*(PSt *General) -> *PSt *General pm_set ps