on master help sign in
Get things in place to pass Prelude interfaces
commit0fd1f677a5d99d4479ddef1948b25f37c362ab35 authorEvan Czaplicki <info@elm-lang.org> dateSun 21 Jul 2013, 07:17 (13 years ago) parentb1dd157
1 file changed+8−2
compiler/Compiler.hs+8−2
compiler/Compiler.hs+8−2
@@ -79,7 +79,12 @@ elmo flags filePath = file flags filePath "elmo"
7979elmi flags filePath = file flags filePath "elmi"
8080
8181
82−buildFile :: Flags -> Int -> Int -> (Map.Map String ModuleInterface) -> FilePath -> IO ModuleInterface
82+buildFile :: Flags
83+ -> Int
84+ -> Int
85+ -> Map.Map String ModuleInterface
86+ -> FilePath
87+ -> IO ModuleInterface
8388buildFile flags moduleNum numModules interfaces filePath =
8489 do compiled <- alreadyCompiled
8590 if compiled then decodeFile (elmi flags filePath) else compile
@@ -140,7 +145,8 @@ getRuntime flags =
140145build :: Flags -> FilePath -> IO ()
141146build flags rootFile = do
142147 files <- if make flags then getSortedModuleNames rootFile else return [rootFile]
143− interfaces <- buildFiles flags (length files) Map.empty files
148+ let initialInterface = if no_prelude flags then Map.empty else Map.empty
149+ interfaces <- buildFiles flags (length files) initialInterface files
144150 js <- foldM appendToOutput "" files
145151 case only_js flags of
146152 True -> do