From d56108190d120e363c719914ddfb5ab0ea59fe81 Mon Sep 17 00:00:00 2001 From: Diederik van Arkel Date: Mon, 3 Feb 2003 11:11:54 +0000 Subject: [PATCH] partial haskell frontend support --- Ide/projwin.icl | 55 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/Ide/projwin.icl b/Ide/projwin.icl index 338dac9..d46101c 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 -- GitLab