Commit d5610819 authored by Diederik van Arkel's avatar Diederik van Arkel

partial haskell frontend support

parent 590805fa
...@@ -538,16 +538,63 @@ where ...@@ -538,16 +538,63 @@ where
= makenice u s r = makenice u s r
where where
f mod = if shift f mod = if shift
(OpenModule (MakeDefPathname mod) emptySelection) (open_def mod) //(OpenModule (MakeDefPathname mod) emptySelection)
(OpenModule (MakeImpPathname mod) emptySelection) (open_imp mod) //(OpenModule (MakeImpPathname mod) emptySelection)
f` mod = if shift f` mod = if shift
(OpenModule (MakeImpPathname mod) emptySelection) (open_imp mod) //(OpenModule (MakeImpPathname mod) emptySelection)
(OpenModule (MakeDefPathname mod) emptySelection) (open_def mod) //(OpenModule (MakeDefPathname mod) emptySelection)
isUnfoldedDir d Nil = False isUnfoldedDir d Nil = False
isUnfoldedDir d ((u,d`):!ds) isUnfoldedDir d ((u,d`):!ds)
| d == d` = u | d == d` = u
= isUnfoldedDir d ds = 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: set main module
pm_set :: !*(PSt *General) -> *PSt *General pm_set :: !*(PSt *General) -> *PSt *General
pm_set ps pm_set ps
......
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