on master help sign in
Give values for interfaces and object files
f460d74Evan Czaplicki
src/Elm/Compiler.hs+2−2
@@ -48,11 +48,11 @@ parseDependencies src =
48compile
48compile
49 :: String
49 :: String
50 -> Map.Map PublicModule.Name PublicModule.Interface
50 -> Map.Map PublicModule.Name PublicModule.Interface
51− -> Either String PublicModule.Interface
51+ -> Either String (PublicModule.Interface, String)
52compile source interfaces =
52compile source interfaces =
53 case Source.build True unwrappedInterfaces source of
53 case Source.build True unwrappedInterfaces source of
54 Left docs -> Left . unlines . List.intersperse "" $ map P.render docs
54 Left docs -> Left . unlines . List.intersperse "" $ map P.render docs
55− Right modul -> Right (Module.toInterface modul)
55+ Right modul -> Right (Module.toInterface modul, JS.generate modul)
56 where
56 where
57 unwrappedInterfaces =
57 unwrappedInterfaces =
58 Map.mapKeysMonotonic (\(PublicModule.Name name) -> name) interfaces
58 Map.mapKeysMonotonic (\(PublicModule.Name name) -> name) interfaces