You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading a file at compile time via TH worked before #1450, but does now error, i.e.
importqualifiedLanguage.Haskell.TH.SyntaxasTHmain::IO()
main =putStrLn$(TH.lift =<<TH.runIO (readFile"app/foo.txt"))
fails to compile with message
[1 of 1] Compiling Main ( app/Main.hs, dist/build/stuff/stuff-tmp/Main.o )
---> Starting remote-iserv on port 9094
---| remote-iserv should have started on 9094
0050:err:systray:initialize_systray Could not create tray window
0084:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@C:\\windows\\system32\\drivers\\wineusb.sys,-1" -> L"C:\\windows\\inf\\wineusb.inf"
wine: configuration in L"/build" has been updated.
Listening on port 9094
0024:err:msvcrt:_invalid_parameter (null):0 (null): (null) 0
app/Main.hs:8:17: error:
• Exception when trying to run compile-time code:
app/foo.txt: hGetContents: invalid argument (Bad file descriptor)
Code: TH.lift =<< TH.runIO (readFile "app/foo.txt")
• In the untyped splice:
$(TH.lift =<< TH.runIO (readFile "app/foo.txt"))
|
8 | main = putStrLn $(TH.lift =<< TH.runIO (readFile "app/foo.txt"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
---> killing remote-iserv...
Reading a file at compile time via TH worked before #1450, but does now error, i.e.
fails to compile with message
Minimal reproducible example
Repo: https://github.com/amesgen/stuff/tree/haskell.nix-mingwW64-TH-readFile
This fails:
This succeeds:
where
The text was updated successfully, but these errors were encountered: