on master help sign in
Start breaking the build process up into smaller modules
commit6cb3b3006283d433884737a8cbddbaf8396c24bc authorEvan Czaplicki <info@elm-lang.org> dateSat 14 Dec 2013, 21:46 (13 years ago) parent80e8af6
9 files changed+300−259
compiler/Build/Build.hs+158 compiler/Initialize.hs → compiler/Build/Dependencies.hs+1−43 compiler/Build/Flags.hs+44 compiler/Build/FromSource.hs+63 compiler/Build/Info.hs+11 compiler/Build/Utils.hs+20 compiler/Compiler.hs+3−212 compiler/Generate/Html.hs−4 compiler/Paths_El.hs → compiler/Paths_Elm.hs
compiler/Build/Build.hsnew file+158
@@ -0,0 +1,158 @@
1+module Build.Build (build) where
2+
3+import Control.Monad (when, forM_, foldM)
4+import qualified Data.Map as Map
5+import qualified Data.List as List
6+import qualified Data.Binary as Binary
7+import System.Directory
8+import System.Exit
9+import System.FilePath
10+import System.IO
11+
12+import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
13+import qualified Data.ByteString.Lazy.Char8 as BS
14+import qualified Data.ByteString.Lazy as L
15+
16+import qualified Metadata.Prelude as Prelude
17+import qualified Transform.Canonicalize as Canonical
18+import SourceSyntax.Module
19+import Parse.Module (getModuleName)
20+import qualified Build.FromSource as FromSource
21+import Build.Dependencies (getSortedDependencies)
22+import Generate.JavaScript (jsModule)
23+import Generate.Html (createHtml, JSSource(..))
24+import qualified InterfaceSerialization as IS
25+
26+import SourceSyntax.PrettyPrint (pretty, variable)
27+import Text.PrettyPrint as P
28+import qualified Type.Alias as Alias
29+
30+import qualified Build.Utils as Utils
31+import qualified Build.Info as Info
32+import qualified Build.Flags as Flag
33+
34+buildFile :: Flag.Flags -> Int -> Int -> Interfaces -> FilePath -> IO (String, ModuleInterface)
35+buildFile flags moduleNum numModules interfaces filePath = do
36+ compiled <- alreadyCompiled
37+ if not compiled then compile else do
38+ bytes <- IS.loadInterface (Utils.elmi flags filePath)
39+ let binary = IS.interfaceDecode (Utils.elmi flags filePath) =<< bytes
40+ case IS.validVersion filePath =<< binary of
41+ Left err -> do
42+ hPutStrLn stderr err
43+ exitFailure
44+
45+ Right (name, interface) -> do
46+ when (Flag.print_types flags) $
47+ printTypes interfaces
48+ (iTypes interface)
49+ (iAliases interface)
50+ (iImports interface)
51+
52+ return (name, interface)
53+
54+ where
55+ alreadyCompiled :: IO Bool
56+ alreadyCompiled = do
57+ existsi <- doesFileExist (Utils.elmi flags filePath)
58+ existso <- doesFileExist (Utils.elmo flags filePath)
59+ if not existsi || not existso
60+ then return False
61+ else do tsrc <- getModificationTime filePath
62+ tint <- getModificationTime (Utils.elmo flags filePath)
63+ return (tsrc <= tint)
64+
65+ number :: String
66+ number = "[" ++ show moduleNum ++ " of " ++ show numModules ++ "]"
67+
68+ compile :: IO (String,ModuleInterface)
69+ compile = do
70+ source <- readFile filePath
71+ let name = case getModuleName source of
72+ Just n -> n
73+ Nothing -> "Main"
74+ putStrLn $ concat [ number, " Compiling ", name
75+ , replicate (max 1 (20 - length name)) ' '
76+ , "( " ++ filePath ++ " )" ]
77+
78+ createDirectoryIfMissing True (Flag.cache_dir flags)
79+ createDirectoryIfMissing True (Flag.build_dir flags)
80+
81+ metaModule <-
82+ case FromSource.build (Flag.no_prelude flags) interfaces source of
83+ Left errors -> do
84+ mapM print (List.intersperse (P.text " ") errors)
85+ exitFailure
86+ Right modul -> return modul
87+
88+ when (Flag.print_types flags)
89+ (printTypes interfaces
90+ (types metaModule) (aliases metaModule) (imports metaModule))
91+
92+ let interface = Canonical.interface name $ ModuleInterface {
93+ iVersion = Info.version,
94+ iTypes = types metaModule,
95+ iImports = imports metaModule,
96+ iAdts = datatypes metaModule,
97+ iAliases = aliases metaModule,
98+ iFixities = fixities metaModule
99+ }
100+
101+ createDirectoryIfMissing True . dropFileName $ Utils.elmi flags filePath
102+ handle <- openBinaryFile (Utils.elmi flags filePath) WriteMode
103+ L.hPut handle (Binary.encode (name,interface))
104+ hClose handle
105+ writeFile (Utils.elmo flags filePath) (jsModule metaModule)
106+ return (name,interface)
107+
108+printTypes interfaces moduleTypes moduleAliases moduleImports = do
109+ putStrLn ""
110+ let rules = Alias.rules interfaces moduleAliases moduleImports
111+ forM_ (Map.toList moduleTypes) $ \(n,t) -> do
112+ print $ variable n <+> P.text ":" <+> pretty (Alias.realias rules t)
113+ putStrLn ""
114+
115+build :: Flag.Flags -> FilePath -> IO ()
116+build flags rootFile = do
117+ let noPrelude = Flag.no_prelude flags
118+ builtIns <- if noPrelude then return Map.empty else Prelude.interfaces
119+
120+ files <- if Flag.make flags
121+ then getSortedDependencies (Flag.src_dir flags) builtIns rootFile
122+ else return [rootFile]
123+
124+ (moduleName, interfaces) <- buildFiles flags (length files) builtIns "" files
125+
126+ js <- foldM appendToOutput BS.empty files
127+
128+ (extension, code) <- case Flag.only_js flags of
129+ True -> do
130+ putStr "Generating JavaScript ... "
131+ return ("js", js)
132+ False -> do
133+ putStr "Generating HTML ... "
134+ rtsPath <- case Flag.runtime flags of
135+ Just fp -> return fp
136+ Nothing -> Info.runtime
137+ return ("html", renderHtml $
138+ createHtml rtsPath (takeBaseName rootFile) (sources js) moduleName "")
139+
140+ let targetFile = Utils.buildPath flags rootFile extension
141+ createDirectoryIfMissing True (takeDirectory targetFile)
142+ BS.writeFile targetFile code
143+ putStrLn "Done"
144+
145+ where
146+ appendToOutput :: BS.ByteString -> FilePath -> IO BS.ByteString
147+ appendToOutput js filePath =
148+ do src <- BS.readFile (Utils.elmo flags filePath)
149+ return (BS.append src js)
150+
151+ sources js = map Link (Flag.scripts flags) ++ [ Source js ]
152+
153+buildFiles :: Flag.Flags -> Int -> Interfaces -> String -> [FilePath] -> IO (String, Interfaces)
154+buildFiles _ _ interfaces moduleName [] = return (moduleName, interfaces)
155+buildFiles flags numModules interfaces _ (filePath:rest) = do
156+ (name,interface) <- buildFile flags (numModules - length rest) numModules interfaces filePath
157+ let interfaces' = Map.insert name interface interfaces
158+ buildFiles flags numModules interfaces' name rest
compiler/Initialize.hs → compiler/Build/Dependencies.hsrenamed+1−43
@@ -1,4 +1,4 @@
1−module Initialize (buildFromSource, getSortedDependencies) where
1+module Build.Dependencies (getSortedDependencies) where
22
33import Data.Data
44import Control.Monad.State
@@ -21,48 +21,6 @@ import qualified Type.Inference as TI
2121import qualified Type.Constrain.Declaration as TcDecl
2222import qualified Transform.Canonicalize as Canonical
2323
24−buildFromSource :: Bool -> Interfaces -> String -> Either [Doc] (MetadataModule () ())
25−buildFromSource noPrelude interfaces source =
26− do let add = if noPrelude then id else Prelude.add
27− infixes = Map.fromList . map (\(assoc,lvl,op) -> (op,(lvl,assoc)))
28− . concatMap iFixities $ Map.elems interfaces
29−
30− modul@(Module _ _ _ decls') <- add `fmap` Parse.program infixes source
31−
32− -- check for structural errors
33− Module names exs ims decls <-
34− case Check.mistakes decls' of
35− [] -> return modul
36− ms -> Left ms
37−
38− let exports'
39− | null exs =
40− let get = Set.toList . SD.boundVars in
41− concat [ get pattern | Definition (Def pattern _) <- decls ] ++
42− concat [ map fst ctors | Datatype _ _ ctors <- decls ] ++
43− [ name | TypeAlias name _ (Type.Record _ _) <- decls ]
44− | otherwise = exs
45−
46− metaModule <- Canonical.metadataModule interfaces $ MetadataModule {
47− names = names,
48− path = FP.joinPath names,
49− exports = exports',
50− imports = ims,
51− -- reorder AST into strongly connected components
52− program = SD.sortDefs . dummyLet $ TcDecl.toExpr decls,
53− types = Map.empty,
54− datatypes = [ (name,vars,ctors) | Datatype name vars ctors <- decls ],
55− fixities = [ (assoc,level,op) | Fixity assoc level op <- decls ],
56− aliases = [ (name,tvs,tipe) | TypeAlias name tvs tipe <- decls ],
57− foreignImports = [ (evt,v,name,typ) | ImportEvent evt v name typ <- decls ],
58− foreignExports = [ (evt,name,typ) | ExportEvent evt name typ <- decls ]
59− }
60−
61− types <- TI.infer interfaces metaModule
62−
63− return $ metaModule { types = types }
64−
65−
6624getSortedDependencies :: [FilePath] -> Interfaces -> FilePath -> IO [String]
6725getSortedDependencies srcDirs builtIns root =
6826 sortDeps =<< readDeps srcDirs builtIns root
compiler/Build/Flags.hsnew file+44
@@ -0,0 +1,44 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+module Build.Flags where
3+
4+import qualified Build.Info as Info
5+import System.Console.CmdArgs
6+
7+data Flags = Flags
8+ { make :: Bool
9+ , files :: [FilePath]
10+ , runtime :: Maybe FilePath
11+ , only_js :: Bool
12+ , print_types :: Bool
13+ , scripts :: [FilePath]
14+ , no_prelude :: Bool
15+ , cache_dir :: FilePath
16+ , build_dir :: FilePath
17+ , src_dir :: [FilePath]
18+ }
19+ deriving (Data,Typeable,Show,Eq)
20+
21+flags = Flags
22+ { files = def &= args &= typ "FILES"
23+ , make = False
24+ &= help "automatically compile dependencies."
25+ , only_js = False
26+ &= help "Compile only to JavaScript."
27+ , no_prelude = False
28+ &= help "Do not import Prelude by default, used only when compiling standard libraries."
29+ , scripts = [] &= typFile
30+ &= help "Load JavaScript files in generated HTML. Files will be included in the given order."
31+ , runtime = Nothing &= typFile
32+ &= help "Specify a custom location for Elm's runtime system."
33+ , cache_dir = "cache" &= typFile
34+ &= help "Directory for files cached to make builds faster. Defaults to cache/ directory."
35+ , build_dir = "build" &= typFile
36+ &= help "Directory for generated HTML and JS files. Defaults to build/ directory."
37+ , src_dir = ["."] &= typFile
38+ &= help "Additional source directories besides project root. Searched when using --make"
39+ , print_types = False
40+ &= help "Print out infered types of top-level definitions."
41+ } &= help "Compile Elm programs to HTML, CSS, and JavaScript."
42+ &= helpArg [explicit, name "help", name "h"]
43+ &= versionArg [explicit, name "version", name "v", summary Info.version]
44+ &= summary ("The Elm Compiler " ++ Info.version ++ ", (c) Evan Czaplicki 2011-2013")
compiler/Build/FromSource.hsnew file+63
@@ -0,0 +1,63 @@
1+module Build.FromSource (build) where
2+
3+import Data.Data
4+import Control.Monad.State
5+import qualified Data.Graph as Graph
6+import qualified Data.List as List
7+import qualified Data.Map as Map
8+import qualified Data.Set as Set
9+import System.Directory
10+import System.Exit
11+import System.FilePath as FP
12+import Text.PrettyPrint (Doc)
13+
14+import SourceSyntax.Everything
15+import qualified SourceSyntax.Type as Type
16+import qualified Parse.Parse as Parse
17+import qualified Metadata.Prelude as Prelude
18+import qualified Transform.Check as Check
19+import qualified Transform.SortDefinitions as SD
20+import qualified Type.Inference as TI
21+import qualified Type.Constrain.Declaration as TcDecl
22+import qualified Transform.Canonicalize as Canonical
23+
24+build :: Bool -> Interfaces -> String -> Either [Doc] (MetadataModule () ())
25+build noPrelude interfaces source =
26+ do let add = if noPrelude then id else Prelude.add
27+ infixes = Map.fromList . map (\(assoc,lvl,op) -> (op,(lvl,assoc)))
28+ . concatMap iFixities $ Map.elems interfaces
29+
30+ modul@(Module _ _ _ decls') <- add `fmap` Parse.program infixes source
31+
32+ -- check for structural errors
33+ Module names exs ims decls <-
34+ case Check.mistakes decls' of
35+ [] -> return modul
36+ ms -> Left ms
37+
38+ let exports'
39+ | null exs =
40+ let get = Set.toList . SD.boundVars in
41+ concat [ get pattern | Definition (Def pattern _) <- decls ] ++
42+ concat [ map fst ctors | Datatype _ _ ctors <- decls ] ++
43+ [ name | TypeAlias name _ (Type.Record _ _) <- decls ]
44+ | otherwise = exs
45+
46+ metaModule <- Canonical.metadataModule interfaces $ MetadataModule {
47+ names = names,
48+ path = FP.joinPath names,
49+ exports = exports',
50+ imports = ims,
51+ -- reorder AST into strongly connected components
52+ program = SD.sortDefs . dummyLet $ TcDecl.toExpr decls,
53+ types = Map.empty,
54+ datatypes = [ (name,vars,ctors) | Datatype name vars ctors <- decls ],
55+ fixities = [ (assoc,level,op) | Fixity assoc level op <- decls ],
56+ aliases = [ (name,tvs,tipe) | TypeAlias name tvs tipe <- decls ],
57+ foreignImports = [ (evt,v,name,typ) | ImportEvent evt v name typ <- decls ],
58+ foreignExports = [ (evt,name,typ) | ExportEvent evt name typ <- decls ]
59+ }
60+
61+ types <- TI.infer interfaces metaModule
62+
63+ return $ metaModule { types = types }
compiler/Build/Info.hsnew file+11
@@ -0,0 +1,11 @@
1+module Build.Info where
2+
3+import qualified Paths_Elm as This
4+import qualified Data.Version as Version
5+
6+version :: String
7+version = Version.showVersion This.version
8+
9+runtime :: IO FilePath
10+runtime = This.getDataFileName "elm-runtime.js"
11+
compiler/Build/Utils.hsnew file+20
@@ -0,0 +1,20 @@
1+module Build.Utils where
2+
3+import System.FilePath ((</>), replaceExtension)
4+import qualified Build.Flags as Flag
5+
6+buildPath :: Flag.Flags -> FilePath -> String -> FilePath
7+buildPath flags filePath ext =
8+ Flag.build_dir flags </> replaceExtension filePath ext
9+
10+cachePath :: Flag.Flags -> FilePath -> String -> FilePath
11+cachePath flags filePath ext =
12+ Flag.cache_dir flags </> replaceExtension filePath ext
13+
14+elmo :: Flag.Flags -> FilePath -> FilePath
15+elmo flags filePath =
16+ cachePath flags filePath "elmo"
17+
18+elmi :: Flag.Flags -> FilePath -> FilePath
19+elmi flags filePath =
20+ cachePath flags filePath "elmi"
compiler/Compiler.hs+3−212
@@ -1,75 +1,9 @@
1−{-# LANGUAGE DeriveDataTypeable #-}
21module Main where
32
4−import Control.Monad
5−import qualified Data.Map as Map
6−import qualified Data.List as List
7−import qualified Data.Binary as Binary
8−import Data.Version (showVersion)
9−import System.Console.CmdArgs hiding (program)
10−import System.Directory
11−import System.Exit
12−import System.FilePath
13−import System.IO
3+import System.Console.CmdArgs
144import GHC.Conc
15−
16−import Text.Blaze.Html.Renderer.Pretty (renderHtml)
17−import qualified Data.ByteString.Lazy.Char8 as BS
18−import qualified Data.ByteString.Lazy as L
19−
20−import qualified Metadata.Prelude as Prelude
21−import qualified Transform.Canonicalize as Canonical
22−import SourceSyntax.Module
23−import Parse.Module (getModuleName)
24−import Initialize (buildFromSource, getSortedDependencies)
25−import Generate.JavaScript (jsModule)
26−import Generate.Html (createHtml, JSSource(..))
27−import qualified InterfaceSerialization as IS
28−import Paths_Elm
29−
30−import SourceSyntax.PrettyPrint (pretty, variable)
31−import Text.PrettyPrint as P
32−import qualified Type.Type as Type
33−import qualified Type.Alias as Alias
34−
35−data Flags =
36− Flags { make :: Bool
37− , files :: [FilePath]
38− , runtime :: Maybe FilePath
39− , only_js :: Bool
40− , print_types :: Bool
41− , scripts :: [FilePath]
42− , no_prelude :: Bool
43− , cache_dir :: FilePath
44− , build_dir :: FilePath
45− , src_dir :: [FilePath]
46− }
47− deriving (Data,Typeable,Show,Eq)
48−
49−flags = Flags
50− { files = def &= args &= typ "FILES"
51− , make = False
52− &= help "automatically compile dependencies."
53− , only_js = False
54− &= help "Compile only to JavaScript."
55− , no_prelude = False
56− &= help "Do not import Prelude by default, used only when compiling standard libraries."
57− , scripts = [] &= typFile
58− &= help "Load JavaScript files in generated HTML. Files will be included in the given order."
59− , runtime = Nothing &= typFile
60− &= help "Specify a custom location for Elm's runtime system."
61− , cache_dir = "cache" &= typFile
62− &= help "Directory for files cached to make builds faster. Defaults to cache/ directory."
63− , build_dir = "build" &= typFile
64− &= help "Directory for generated HTML and JS files. Defaults to build/ directory."
65− , src_dir = ["."] &= typFile
66− &= help "Additional source directories besides project root. Searched when using --make"
67− , print_types = False
68− &= help "Print out infered types of top-level definitions."
69− } &= help "Compile Elm programs to HTML, CSS, and JavaScript."
70− &= helpArg [explicit, name "help", name "h"]
71− &= versionArg [explicit, name "version", name "v", summary (showVersion version)]
72− &= summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki 2011-2013")
5+import Build.Flags
6+import Build.Build
737
748main :: IO ()
759main = do setNumCapabilities =<< getNumProcessors
@@ -80,146 +14,3 @@ compileArgs flags =
8014 case files flags of
8115 [] -> putStrLn "Usage: elm [OPTIONS] [FILES]\nFor more help: elm --help"
8216 fs -> mapM_ (build flags) fs
83−
84−
85−buildPath :: Flags -> FilePath -> String -> FilePath
86−buildPath flags filePath ext = build_dir flags </> replaceExtension filePath ext
87−
88−cachePath :: Flags -> FilePath -> String -> FilePath
89−cachePath flags filePath ext = cache_dir flags </> replaceExtension filePath ext
90−
91−elmo :: Flags -> FilePath -> FilePath
92−elmo flags filePath = cachePath flags filePath "elmo"
93−
94−elmi :: Flags -> FilePath -> FilePath
95−elmi flags filePath = cachePath flags filePath "elmi"
96−
97−buildFile :: Flags -> Int -> Int -> Interfaces -> FilePath -> IO (String, ModuleInterface)
98−buildFile flags moduleNum numModules interfaces filePath = do
99− compiled <- alreadyCompiled
100− if not compiled then compile else do
101− bytes <- IS.loadInterface (elmi flags filePath)
102− let binary = IS.interfaceDecode (elmi flags filePath) =<< bytes
103− case IS.validVersion filePath =<< binary of
104− Left err -> do
105− hPutStrLn stderr err
106− exitFailure
107−
108− Right (name, interface) -> do
109− when (print_types flags) $
110− printTypes interfaces
111− (iTypes interface)
112− (iAliases interface)
113− (iImports interface)
114−
115− return (name, interface)
116−
117− where
118− alreadyCompiled :: IO Bool
119− alreadyCompiled = do
120− existsi <- doesFileExist (elmi flags filePath)
121− existso <- doesFileExist (elmo flags filePath)
122− if not existsi || not existso
123− then return False
124− else do tsrc <- getModificationTime filePath
125− tint <- getModificationTime (elmo flags filePath)
126− return (tsrc <= tint)
127−
128− number :: String
129− number = "[" ++ show moduleNum ++ " of " ++ show numModules ++ "]"
130−
131− compile :: IO (String,ModuleInterface)
132− compile = do
133− source <- readFile filePath
134− let name = case getModuleName source of
135− Just n -> n
136− Nothing -> "Main"
137− putStrLn $ concat [ number, " Compiling ", name
138− , replicate (max 1 (20 - length name)) ' '
139− , "( " ++ filePath ++ " )" ]
140−
141− createDirectoryIfMissing True (cache_dir flags)
142− createDirectoryIfMissing True (build_dir flags)
143−
144− metaModule <-
145− case buildFromSource (no_prelude flags) interfaces source of
146− Left errors -> do
147− mapM print (List.intersperse (P.text " ") errors)
148− exitFailure
149− Right modul -> return modul
150−
151− when (print_types flags)
152− (printTypes interfaces
153− (types metaModule) (aliases metaModule) (imports metaModule))
154−
155− let interface = Canonical.interface name $ ModuleInterface {
156− iVersion = showVersion version,
157− iTypes = types metaModule,
158− iImports = imports metaModule,
159− iAdts = datatypes metaModule,
160− iAliases = aliases metaModule,
161− iFixities = fixities metaModule
162− }
163−
164− createDirectoryIfMissing True . dropFileName $ elmi flags filePath
165− handle <- openBinaryFile (elmi flags filePath) WriteMode
166− L.hPut handle (Binary.encode (name,interface))
167− hClose handle
168− writeFile (elmo flags filePath) (jsModule metaModule)
169− return (name,interface)
170−
171−printTypes interfaces moduleTypes moduleAliases moduleImports = do
172− putStrLn ""
173− let rules = Alias.rules interfaces moduleAliases moduleImports
174− forM_ (Map.toList moduleTypes) $ \(n,t) -> do
175− print $ variable n <+> P.text ":" <+> pretty (Alias.realias rules t)
176− putStrLn ""
177−
178−getRuntime :: Flags -> IO FilePath
179−getRuntime flags =
180− case runtime flags of
181− Just fp -> return fp
182− Nothing -> getDataFileName "elm-runtime.js"
183−
184−build :: Flags -> FilePath -> IO ()
185−build flags rootFile = do
186− let noPrelude = no_prelude flags
187− builtIns <- if noPrelude then return Map.empty else Prelude.interfaces
188−
189− files <- if make flags
190− then getSortedDependencies (src_dir flags) builtIns rootFile
191− else return [rootFile]
192−
193− (moduleName, interfaces) <- buildFiles flags (length files) builtIns "" files
194−
195− js <- foldM appendToOutput BS.empty files
196−
197− (extension, code) <- case only_js flags of
198− True -> do
199− putStr "Generating JavaScript ... "
200− return ("js", js)
201− False -> do
202− putStr "Generating HTML ... "
203− rtsPath <- getRuntime flags
204− return ("html", BS.pack . renderHtml $
205− createHtml rtsPath (takeBaseName rootFile) (sources js) moduleName "")
206−
207− let targetFile = buildPath flags rootFile extension
208− createDirectoryIfMissing True (takeDirectory targetFile)
209− BS.writeFile targetFile code
210− putStrLn "Done"
211−
212− where
213− appendToOutput :: BS.ByteString -> FilePath -> IO BS.ByteString
214− appendToOutput js filePath =
215− do src <- BS.readFile (elmo flags filePath)
216− return (BS.append src js)
217−
218− sources js = map Link (scripts flags) ++ [ Source js ]
219−
220−buildFiles :: Flags -> Int -> Interfaces -> String -> [FilePath] -> IO (String, Interfaces)
221−buildFiles _ _ interfaces moduleName [] = return (moduleName, interfaces)
222−buildFiles flags numModules interfaces _ (filePath:rest) = do
223− (name,interface) <- buildFile flags (numModules - length rest) numModules interfaces filePath
224− let interfaces' = Map.insert name interface interfaces
225− buildFiles flags numModules interfaces' name rest
compiler/Generate/Html.hs−4
@@ -10,10 +10,6 @@ import Text.Blaze.Html5 ((!))
1010import qualified Text.Blaze.Html5.Attributes as A
1111import qualified Data.ByteString.Lazy.Char8 as BS
1212
13−import Initialize (buildFromSource)
14−import Generate.JavaScript
15−import Generate.Noscript
16−
1713data JSSource = Link String | Source BS.ByteString
1814
1915makeScript :: JSSource -> H.Html
compiler/Paths_El.hs → compiler/Paths_Elm.hsrenamed

The content is the same.