@@ -68,12 +68,12 @@ fileTo get what jsFiles noscript rtLoc file = do
6868 writeFile html . renderHtml $ linkedHtml rtLoc js ms
6969 writeFile js $ jss ++ concatMap jsModule ms
7070
71−getModules :: [String] -> FilePath -> IO (Either String [Module])
71+getModules :: [String] -> FilePath -> IO (Either String [([String],Module)])
7272getModules uses file = do
7373 code <- readFile file
7474 case initialize code of
7575 Left err -> return . Left $ "Error in " ++ file ++ ":\n" ++ err
76− Right modul@(Module _ _ imports _) ->
76+ Right (escs, modul@(Module _ _ imports _)) ->
7777 let imps = filter (`notElem` builtInModules) $ map fst imports in
7878 case intersect uses imps of
7979 x:_ -> return . Left $ "Error: Cyclic dependency. Module " ++
@@ -81,10 +81,10 @@ getModules uses file = do
8181 [] -> do
8282 ems <- mapM (getModules (uses ++ imps) . toFilePath) imps
8383 return $ case lefts ems of
84− [] -> Right $ concat (rights ems) ++ [modul]
84+ [] -> Right $ concat (rights ems) ++ [(escs,modul)]
8585 errs -> Left $ intercalate "\n" errs
8686
87−getModule :: FilePath -> IO (Either String [Module])
87+getModule :: FilePath -> IO (Either String [([String],Module)])
8888getModule file = do
8989 code <- readFile file
9090 return . fmap (:[]) $ initialize code