on master help sign in
avoid creating file name twice
commit4f378cded5b1d9373924d79474db82a3e835ba8c authorEvan Czaplicki <evancz@users.noreply.github.com> dateWed 26 Jun 2019, 17:15 (7 years ago) parentd966ba2
1 file changed+3−3
builder/src/Build.hs+3−3
builder/src/Build.hs+3−3
@@ -665,8 +665,9 @@ compile (Env key root pkg _ _ _) docsNeed local@(Details.Local path time _ _) so
665665 do let name = Src.getName modul
666666 let iface = I.fromModule pkg canonical annotations
667667 let docs = makeDocs docsNeed canonical
668+ let path = Stuff.elmi root name
668669 File.writeBinary (Stuff.elmo root name) objects
669− maybeOldi <- File.readBinary (Stuff.elmi root name)
670+ maybeOldi <- File.readBinary path
670671 case maybeOldi of
671672 Just oldi | oldi == iface ->
672673 do -- iface should be fully forced by equality check
@@ -675,8 +676,7 @@ compile (Env key root pkg _ _ _) docsNeed local@(Details.Local path time _ _) so
675676
676677 _ ->
677678 do -- iface may be lazy still
678− -- TODO try adding forkIO here
679− File.writeBinary (Stuff.elmi root name) iface
679+ File.writeBinary path iface
680680 Reporting.report key Reporting.BDone
681681 return (RNew local iface objects docs)
682682