diff --git a/src/plugins/System/Plugins/Load.hs b/src/plugins/System/Plugins/Load.hs index c919af1..ab6236f 100644 --- a/src/plugins/System/Plugins/Load.hs +++ b/src/plugins/System/Plugins/Load.hs @@ -223,19 +223,28 @@ unify obj incs args ty sym = do hClose hdl1 let nm = mkModid (basename tmpf) - src = mkTest nm (mkModid obj) (fst $ break (=='.') ty) ty sym + src = mkTest nm (hierize' . mkModid . hierize $ obj) + (fst $ break (=='.') ty) ty sym is = map (\s -> "-i"++s) incs -- api i = "-i" ++ dirname obj -- plugin hWrite hdl src --- was need for cygwin, should be ok now: --- e <- build tmpf "nul" (i:is++args++["-fno-code","-ohi nul"]) e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1]) - removeFile tmpf + -- removeFile tmpf removeFile tmpf1 return e + where + -- fix up hierarchical names + hierize [] = [] + hierize ('/':cs) = '\\' : hierize cs + hierize (c:cs) = c : hierize cs + + hierize'[] = [] + hierize' ('\\':cs) = '.' : hierize' cs + hierize' (c:cs) = c : hierize' cs + mkTest modnm plugin api ty sym = "module "++ modnm ++" where" ++ "\nimport qualified " ++ plugin ++ diff --git a/src/plugins/System/Plugins/Make.hs b/src/plugins/System/Plugins/Make.hs index 470c3e2..ab444e5 100644 --- a/src/plugins/System/Plugins/Make.hs +++ b/src/plugins/System/Plugins/Make.hs @@ -134,6 +134,8 @@ recompileAll' suffices m args -> makeAll source args else return (MakeSuccess NotReq (path m)) +-- touch. + -- --------------------------------------------------------------------- -- | Standard make. Compile a single module, unconditionally. -- Behaves like ghc -c