on master help sign in
add NOINLINE to defaultModuleName

Without this change, the "Main" value will likely be instantiated many times when running worker.elm-lang.org/compile Not actually certain if Haskell has interning though. Maybe it does and this is not needed!

commit0d5d9f460073219ae0e9d8d6fc980db5e19f30c2 authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 30 Apr 2019, 14:05 (8 years ago) parentc08afa0
1 file changed+7−1
compiler/src/AST/Source.hs+7−1
compiler/src/AST/Source.hs+7−1
@@ -137,7 +137,13 @@ getName :: Module -> Name
137137getName (Module maybeName _ _ _ _ _ _ _) =
138138 case maybeName of
139139 Just name -> name
140− Nothing -> "Main"
140+ Nothing -> defaultModuleName
141+
142+
143+{-# NOINLINE defaultModuleName #-}
144+defaultModuleName :: Name
145+defaultModuleName =
146+ "Main"
141147
142148
143149getImportName :: Import -> Name