
28 Sep
2021
28 Sep
'21
11:36 p.m.
The code worked in the 9.0 API, but using the 9.3 API causes a panic:
sandbox: panic! (the 'impossible' happened) GHC version 9.3.20210918: unsafeGetHomeUnit: No home unit
SOLVED: I was getting an `HscEnv` by using `newHscEnv` with a `DynFlags`. Turns out I'm not supposed to do that; using `getSession` instead solved the problem. Thanks to Cheng Shao for the diagnosis! If there is something I can read to help me avoid similar mistakes in the future, please point me in its direction! Norman