Verified Commit c9d23906 authored by Camil Staps's avatar Camil Staps 🚀

Fixes for modules without dcl

parent db826a73
......@@ -379,7 +379,7 @@ findModules root item base w
#! (fps, w) = readDirectory fullpath w
| isError fps = ([], w)
#! (Ok fps) = fps
#! mods = map makeEntry $ filter included $ filter isIclModule fps
#! mods = [makeEntry fn (isMember (replaceSubString ".icl" ".dcl" fn) fps) \\ fn <- fps | isIclModule fn && included fn]
#! (moremodss,w) = mapSt (findModules root item o ((+++) basedot)) (filter isDirectory fps) w
= (removeDupBy (\m -> 'CDB'.getName m.me_loc) (mods ++ flatten moremodss), w)
where
......@@ -392,9 +392,9 @@ where
(</?>) p "" = p
(</?>) p1 p2 = p1 </> p2
makeEntry :: String -> 'CDB'.ModuleEntry
makeEntry fn =
{ me_loc = location item.IndexItem.name modname (path </?> fn) (Just 1) (Just 1) modname
makeEntry :: !String !Bool -> 'CDB'.ModuleEntry
makeEntry fn has_dcl =
{ me_loc = location item.IndexItem.name modname (path </?> fn) (if has_dcl (Just 1) Nothing) (Just 1) modname
, me_is_core = match item.pattern_core (path </?> fn)
, me_is_app = match item.pattern_app (path </?> fn)
, me_documentation = Nothing
......@@ -468,11 +468,11 @@ findModuleContents :: !Bool !String !*World
)
findModuleContents include_locals path w
#! (dcl,dcl_symbols,w) = readModule False w
#! (dcl,modname) = case dcl of
Left _ -> ([], "")
Right dcl -> (dcl.mod_defs, dcl.mod_ident.id_name)
#! dcl = case dcl of Left _ -> []; Right dcl -> dcl.mod_defs
#! (icl,icl_symbols,w) = readModule True w
#! icl = case icl of Left _ -> []; Right icl -> icl.mod_defs
#! (icl,modname) = case icl of
Left _ -> ([], "")
Right icl -> (icl.mod_defs, icl.mod_ident.id_name)
#! imports = 'S'.fromList [i.import_module.id_name \\ PD_Import is <- dcl ++ icl, i <- is]
#! contents=:(functions,rules,generics,typedefs,clss,insts,derivs,clsderivs) =
( combine cmpLocFst3 joinLocFstIds pd_typespecs dcl dcl_symbols icl icl_symbols
......
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