daml/bazel_tools/haskell-shake.patch
Moritz Kiefer 668373ca85
Embed shake data-files via TH (#4584)
This is a bit ugly but after spending some time digging into the
issues in rules_haskell around data-files, this seems like the most
sensible option especially given that we also want to ship them in the
SDK which woud require additional work even if we do fix it in
rules_haskell.

fixes #4457

changelog_begin
changelog_end
2020-02-18 17:53:27 +01:00

20 lines
813 B
Diff

diff --git a/src/General/Template.hs b/src/General/Template.hs
index 5c1ec774..61701037 100755
--- a/src/General/Template.hs
+++ b/src/General/Template.hs
@@ -34,10 +34,10 @@ import Language.Haskell.TH.Syntax ( runIO )
libraries :: [(String, IO LBS.ByteString)]
libraries =
- [("jquery.js", FILE(JQuery.file))
- ,("jquery.dgtable.js", FILE(DGTable.file))
- ,("jquery.flot.js", FILE(Flot.file Flot.Flot))
- ,("jquery.flot.stack.js", FILE(Flot.file Flot.FlotStack))
+ [("jquery.js", pure $ LBS.fromStrict JQuery.fileContent)
+ ,("jquery.dgtable.js", pure $ LBS.fromStrict DGTable.fileContent)
+ ,("jquery.flot.js", pure $ LBS.fromStrict Flot.flotFileContent)
+ ,("jquery.flot.stack.js", pure $ LBS.fromStrict Flot.flotStackFileContent)
]