@@ -79,7 +79,12 @@ elmo flags filePath = file flags filePath "elmo"
79elmi flags filePath = file flags filePath "elmi"
79elmi flags filePath = file flags filePath "elmi"
82−buildFile :: Flags -> Int -> Int -> (Map.Map String ModuleInterface) -> FilePath -> IO ModuleInterface
85+ -> Map.Map String ModuleInterface
87+ -> IO ModuleInterface
83buildFile flags moduleNum numModules interfaces filePath =
88buildFile flags moduleNum numModules interfaces filePath =
84 do compiled <- alreadyCompiled
89 do compiled <- alreadyCompiled
85 if compiled then decodeFile (elmi flags filePath) else compile
90 if compiled then decodeFile (elmi flags filePath) else compile
@@ -140,7 +145,8 @@ getRuntime flags =
140build :: Flags -> FilePath -> IO ()
145build :: Flags -> FilePath -> IO ()
141build flags rootFile = do
146build flags rootFile = do
142 files <- if make flags then getSortedModuleNames rootFile else return [rootFile]
147 files <- if make flags then getSortedModuleNames rootFile else return [rootFile]
148+ let initialInterface = if no_prelude flags then Map.empty else Map.empty
143− interfaces <- buildFiles flags (length files) Map.empty files
149+ interfaces <- buildFiles flags (length files) initialInterface files
144 js <- foldM appendToOutput "" files
150 js <- foldM appendToOutput "" files
145 case only_js flags of
151 case only_js flags of
146 True -> do
152 True -> do