Verified Commit 075dc1c3 authored by Camil Staps's avatar Camil Staps 🚀

Fix non-hierarchical module names

parent 96f1ea60
Subproject commit eb0b7bc7e1c32f30dcf42481cfbc15833062cbdd
Subproject commit 37fe62dd59f1435a3fbfbfb97218ef40f6af3f8c
Subproject commit f25abe3fd7651ee65406a3bbaf9a97e28a800744
Subproject commit aa42e46ff43f8c4202569ac4778ea2164da72b4e
......@@ -211,6 +211,7 @@ instance getLocation CloogleEntry
getLibrary :: !Location -> Maybe Name
getModule :: !Location -> Maybe Name
setModule :: !Name !Location -> Location
getFilename :: !Location -> Maybe String
getDclLine :: !Location -> Maybe Int
getIclLine :: !Location -> Maybe Int
......
......@@ -170,6 +170,10 @@ getModule :: !Location -> Maybe Name
getModule (Location _ mod _ _ _ _) = Just mod
getModule _ = Nothing
setModule :: !Name !Location -> Location
setModule m (Location lib _ fname dcl icl n) = Location lib m fname dcl icl n
setModule _ l = l
getFilename :: !Location -> Maybe String
getFilename (Location _ _ fn _ _ _) = Just fn
getFilename _ = Nothing
......
......@@ -143,6 +143,10 @@ where
< _ _
= False
import StdDebug
trace_id x = trace_n x x
instance toString (String,String) where toString (x,y) = "Trace: " +++ x +++ ": " +++ y
class match a :: !a !FilePath -> Bool
instance match PathPattern
......@@ -342,7 +346,7 @@ where
(Just l, Just m) -> isMember (l,m) appmods
_ -> False
where
appmods = [(fromJust $ 'CDB'.getLibrary me.me_loc, fromJust $ 'CDB'.getModule me.me_loc) \\ (me,_) <- tdb.temp_modules | me.me_is_app]
appmods = [trace_id (fromJust $ 'CDB'.getLibrary me.me_loc, fromJust $ 'CDB'.getModule me.me_loc) \\ (me,_) <- tdb.temp_modules | me.me_is_app]
libmap = 'M'.fromList
[(l,idxfilter \e -> case 'CDB'.getLocation e >>= 'CDB'.getLibrary of
......@@ -413,7 +417,7 @@ where
indexModule :: !Bool !String !'CDB'.ModuleEntry !TemporaryDB !*World
-> *(!TemporaryDB, !*World)
indexModule include_locals root mod db w
#! (functions,macros,generics,typedefs,clss,insts,derivs,clsderivs,(modname,_,imports),w)
#! (functions,macros,generics,typedefs,clss,insts,derivs,clsderivs,(modname,mod`,imports),w)
= findModuleContents include_locals (root </> lib </> mkdir ('CDB'.getName mod.me_loc)) w
#! typedefs = [{td & tde_loc=castLoc modname loc} \\ (loc,td) <- typedefs]
#! lib = lib % (0, size lib - size modname + size ('CDB'.getName mod.me_loc) - 1)
......@@ -429,7 +433,7 @@ indexModule include_locals root mod db w
, temp_instances = [castLocThd3 modname insts:db.temp_instances]
, temp_derivations = [map (appSnd (castLocThd3 modname)) derivs:db.temp_derivations]
, temp_class_derivations = [castLocFrth modname clsderivs:db.temp_class_derivations]
, temp_modules = [(mod,imports):db.temp_modules]
, temp_modules = [({mod & me_loc='CDB'.setModule modname ('CDB'.setName modname mod.me_loc), me_documentation=mod`.me_documentation},imports):db.temp_modules]
}
= (db,w)
where
......
Subproject commit fd55013666160619318dcabbf562ae4aa09a529d
Subproject commit 1a13b24887c4289f33b4c9d644aa99ee3bad337a
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